trusted-params icon indicating copy to clipboard operation
trusted-params copied to clipboard

Not compatible with Rails 3

Open thibaudgg opened this issue 14 years ago • 4 comments

:'(

thibaudgg avatar Sep 07 '10 10:09 thibaudgg

+1, I like the trusted-params philosophy, also want it for rails 3. maybe will patch it later if got some time :).

nicolasblanco avatar Sep 07 '10 12:09 nicolasblanco

+∞

bbhoss avatar Sep 30 '10 02:09 bbhoss

http://guides.rubyonrails.org/security.html :

"A more paranoid technique to protect your whole project would be to enforce that all models whitelist their accessible attributes. This can be easily achieved with a very simple initializer:

ActiveRecord::Base.send(:attr_accessible, nil)

This will create an empty whitelist of attributes available for mass assignment for all models in your app. As such, your models will need to explicitly whitelist accessible parameters by using an attr_accessible declaration. "

nicolasblanco avatar Sep 30 '10 08:09 nicolasblanco

I'm getting this error when I start my app:

/home/tyler/.rvm/gems/ruby-1.9.2-p180/gems/activerecord-3.0.9/lib/active_record/base.rb:1014:in `method_missing': undefined method `metaclass' for ActiveRecord::Base:Class (NoMethodError)
from /home/tyler/.rvm/gems/ruby-1.9.2-p180/bundler/gems/trusted-params-f9154144e64c/lib/trusted_params/active_record_additions.rb:21:in `extended'

TylerRick avatar Jul 22 '11 21:07 TylerRick