Bug #1743
closed
Validation of name parameters always fails
Added by Sam Kottler over 12 years ago.
Updated over 12 years ago.
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.
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).
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
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.
- Status changed from New to Closed
- % Done changed from 0 to 100
Cool! Thanks Ohad.
Do you think it makes sense to add a functional test to prevent this from happening again?
Also available in: Atom
PDF