Skip to content

NoMethodError (undefined method `attr_accessible' for #<Class:0x0000000aea1f50>) #6

@kartikjagdale

Description

@kartikjagdale

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 :

  1. How can we fix this ?
  2. Can we update gem to make it compatible with rails 4 ?
  3. I am ready to debug and work on this issue, can I work on this bug ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions