search for: massassignent

Displaying 2 results from an estimated 2 matches for "massassignent".

Did you mean: massassignment
2012 Jul 09
10
attr_accessible on some properties + attr_protected on others makes class 'open-by-default'
(I posted this as a bug in GitHub (https://github.com/rails/rails/issues/7018), but then someone there told me I should post it here, so here it is.) If you set attr_accessible on some properties in an ActiveRecord-descended class, and then attr_protected on others - the class becomes ''default-open'' - if any properties are missed or added later, they will be accessible by
2012 Apr 27
1
Can't mass-assign protected attributes even if I use attr_accessible
...rror : <h1> ActiveModel::MassAssignmentSecurity::Error in PostsController#create </h1> <pre>Can''t mass-assign protected attributes: name</pre> I did lots of searches on the topic but I found no working solution :-( I use attr_accessible to avoid MassAssignent errors and it works for all others models but not for the "Author" name attribute. Here is the Author model : class Author < ActiveRecord::Base attr_accessible :name, :email extend FriendlyId friendly_id :name, use: :slugged # some validations has...