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

Brad Gessell
Brad Gessell
3,156 Points

Profile data not saving in "Creating Relationships"

When I visit /users/edit to edit my profile in Treebook, the first name, last name, and profile name that I enter is not being saved. This causes an error when I try to display:

<%= @status.user.first_name %>

because there is no first name associated with that status. Anybody have any ideas where to start looking for the problem?

2 Answers

Brandon Barrette
Brandon Barrette
20,485 Points

You are using rails 4 and need to use strong parameters to allow those values to be passed to the controller and saved to the database.

I just answered this for another person, see here: https://teamtreehouse.com/forum/ruby-issues

Brad Gessell
Brad Gessell
3,156 Points

Thank you very much. This fixed it. I appreciate your response, sir.