Saving attributes fields in devise User model in Rails 4 -
I just follow the guide to add column 'first name' and 'second name' to command in the user's user model I am / P>
Rail Migration add_firstname_to_user generates the first name: String Rail Migration add_secondname_to_user generates another name: string
and I tell the changes with: / P>
rake db: migrate
This has worked fine, because I can see those fields in the console with User.all, but the problem is now I do not see the attr_accessible field in App / Modal / UserRbb.
So I've just added lines:
& Lt; / Div & gt;
In the app / view / devise / registrations in new.html.erb, but this is not working, because I have found that my name is the first name and second name on the registered user What are the features I
What can I do? I think there is something about attr_accessible step, but I could not find it.
Any help would be appreciated.
I can be confused with your post, but I believe (as you have been linked to The document is mentioned in step 3) You must add the following to your user.rb:
attr_accessible: firstname, secondname
Comments
Post a Comment