I just followed this guide to add the columns 'firstname' and 'secondname' to the Devise User Model with the following commands.
rails generate migration add_firstname_to_user firstname:string
rails generate migration add_secondname_to_user secondname:string
and I aplied the changes with:
rake db:migrate
It worked ok, because I can see those fields in the console with User.all, but the problem I have now is that I don't see the attr_accessible field in app/model/user.rb.
So I just added the lines:
<div><%= f.label :first_name %><br />
<%= f.text_field :firstname, autofocus: true %></div>
<div><%= f.label :second_name %><br />
<%= f.text_field :secondname, autofocus: true %></div>
in new.html.erb in app/views/devise/registrations, but it isn't working, because I noticed that the firstname and secondname attributes are nil on the users I registered.
What can I do?, I guess is something about the attr_accessible step, but I couldn't find it.
Any help will be appreciated.