I am using Rails 4 and Devise 3. I have added a custom field of "name." When I submit a name, I receive the "unpermitted parameters: name" and "can't mass assign protected attributes for User: email" errors.
I have been told to add code to a users controller, however Devise did not create one. Am I supposed to create a users_controller.rb on my own, or is there something I am missing here?
My User model looks like this:
class User < ActiveRecord::Base
# Include default devise modules. Others available are:
# :confirmable, :lockable, :timeoutable and :omniauthable
devise :database_authenticatable, :registerable, #:recoverable,
:rememberable, :trackable, :validatable
#attr_accessible :name, :password, :password_confirmation, :remember_me, :email
end
As you can see, I have tried to use attr_accessible, but commented it out since it's not supported in Rails 4.