Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaks on creating a record with fields from associated record. #63

Open
creativetags opened this issue May 30, 2013 · 0 comments
Open

Comments

@creativetags
Copy link

I'm trying to create a new user and I pass a 'note' in the params as it's an associated model but this breaks with:

ActiveModel::MassAssignmentSecurity::Error (Can't mass-assign protected attributes: note):
activemodel (3.2.13) lib/active_model/mass_assignment_security/sanitizer.rb:48:in process_removed_attributes' activemodel (3.2.13) lib/active_model/mass_assignment_security/sanitizer.rb:20:indebug_protected_attribute_removal'
activemodel (3.2.13) lib/active_model/mass_assignment_security/sanitizer.rb:12:in sanitize' activemodel (3.2.13) lib/active_model/mass_assignment_security.rb:230:insanitize_for_mass_assignment'
activerecord (3.2.13) lib/active_record/attribute_assignment.rb:75:in assign_attributes' activerecord (3.2.13) lib/active_record/base.rb:498:ininitialize'
lib/enumerated_attribute/integrations/active_record.rb:106:in `new'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant