In Rails 4 attr_accessible is no longer used and dosen't work anymore.
Refer question on stackoverflow for details :
attr_accessible seems to no longer work within my model.
Started POST "/headshot/capture" for 127.0.0.1 at 2016-08-18 18:37:17 +0530
Processing by HeadshotController#capture as HTML
Completed 500 Internal Server Error in 10ms (ActiveRecord: 2.2ms)
NoMethodError (undefined method `attr_accessible' for #<Class:0x0000000aea1f50>):
app/models/headshot_photo.rb:2:in `<class:HeadshotPhoto>'
app/models/headshot_photo.rb:1:in `<top (required)>'
Query :
- How can we fix this ?
- Can we update gem to make it compatible with rails 4 ?
- I am ready to debug and work on this issue, can I work on this bug ?