ruby on rails - Mass Security Assignment to undefined method `attr_accessible -


i'm using rails 3.2.13 , refinery inquiries gem. needed add field contact form provided inquiries gem; however, error

     “warning: can't mass-assign protected attributes” 

i had read not disable whitelist in application.rb. did

  config.active_record.whitelist_attributes = false 

it still didn't work. tried go ahead , add attr_accessible

/config/initializers/refinery/inquiries.rb

  refinery::inquiries.configure |config|   attr_accessible :location   end 

but error

/config/initializers/refinery/inquiries.rb:7:in <top (required)>': undefined methodattr_accessible' main:object (nomethoderror)

i need form field work. hints!? please!?

attr_accessible  

is used in model's definition, not in block. object writing into?


Comments

Popular posts from this blog

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

html - How to style widget with post count different than without post count -

url rewriting - How to redirect a http POST with urlrewritefilter -