Bug #1743
closedValidation of name parameters always fails
Description
Steps to reproduce:
1) Install a fresh version of Foreman from Git (or the nightly builds)
2) Try to add a new record of any type to uses the "name" parameter. Puppetclass, hostgroup, etc.
3) Get a validation error even when the field is valid.
https://skitch.com/skottler/egyct/1-root-ubuntu-12-usr-share-foreman-ssh
Setting the priority to immediate because this seems like a 1.0 release blocker.
Updated by Michael Coulter over 12 years ago
Observing same behaviour. Seen with 1.0-rc and nightly debs. Cranked log_level up to debug and this appears to be the culprit:
WARNING: Can't mass-assign protected attributes: architecture_ids, name, medium_ids, release_name, minor, ptable_ids, major, family
Looking around at the models, some already have attr_accessible declarations and some don't. I'm not sure how this is meant to work, and what actually provoked the breakage (i.e. is it a foreman related change, or better safety checks in rails).
Updated by Ohad Levy over 12 years ago
I wonder if this is only deb/ubuntu, I'll try to have a look, but i have a feeling the rails packages include a few more patches on top of the 3.0.15 release
Updated by Ohad Levy over 12 years ago
OK, I can reproduce, it seems a recent gem upgrade has been triggering this change, I'll try to narrow it down and find out which gem changes the behavior.
Updated by Ohad Levy over 12 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100
Applied in changeset 85cc156a22f8db8d62a1db953c945a3e29e99ad5.
Updated by Sam Kottler over 12 years ago
Cool! Thanks Ohad.
Do you think it makes sense to add a functional test to prevent this from happening again?