I have user model with use of devise gem, I dont have attr_accessible for any fields still I get the error:
Can’t mass-assign protected attributes
My User class as below
class User < ActiveRecord::Base
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable,
:token_authenticatable #, :validatable
end
I also have the same problem, maybe devise does something with
attr_accessible. You need to set upattr_accessiblein your model to make it work.You can checkout these railscasts episodes.
http://railscasts.com/episodes/209-introducing-devise
http://railscasts.com/episodes/210-customizing-devise