Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.Start your free trial
aviral prakash518 Points
log in page first name value is nil
I am using windows laptop with rails 4. I created sign up page using devise and added variables like first_name last_name and profile_name which are asked for the sign up. But when i run the rails console and search the users i find that these three variables are nil even though they were assigned a value during sign_up. I cannot add protected attributes gem file because it gives error during sign up in rails 4. What should i do so that the values are stored permanently in these variables.
Nandini Goel2,263 Points
ok if you are using rail 4 then go to your controller and find params.require(:user).permit( after the bracket add : :first_name, :last_name, :profile name
hope this works for you. if you are satisfied then do rate the answer. regards