Hi, I think it's awesome that Rails 3.1 introduces the attribute accessible roles/permissions:
class User attr_accessible :name, :as => :admin end User.create(params[:user], :as => :admin) But would it be possible to make this a chained function as was done with find, where and scopes from Rails 2.x to Rails 3.0? Here's a little more on the topic<http://ablogaboutcode.com/2011/05/12/activerecord-3-1-mass-assignment-roles/>. Maybe ARel could be leveraged to do this? I can see that there might be conflicts with user defined scopes, but isn't chaining functions just so much more elegant than passing multiple hash parameters to a function? Thanks, Pan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
