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! While you're at it, check out some resources Treehouse students have shared here.

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

Ruby

Rails: added attributes to devise user model but not able to add new values to them

I'm following through building a simple app with ruby on rails.

I've installed devise. I have added some other attributes into the migration (first name, last name, profile name). I have then migrated the database. I have also created the view.

But when I create a new user now, these three new attributes aren't stored in my user profile (i.e. it looks as though I am adding them on the sign up form, but the actual value is nil).

<User id: 2, first_name: nil, last_name: nil, profile_name: nil etc...

Is this to do with attr_accessible and using rails 4, or is it something else?

1 Answer

Sorry, I have now found the answer on this thread https://teamtreehouse.com/forum/strongparameters-and-treebook