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
Tim Smith
11,164 PointsTreebook Creating Relationships
Hello again,
I am working on the Treebook app on rails. I am at the point where we are taught how to set up relationships between Statuses and Users. The problem I am having is that when a new user is created the "first_name", "last_name", and "profile_name" are not being populated.
I solved a similar error with the Statuses "user_id" by adding a line to the statuses_controller.rb.
The problem I am having now is there is no Users_controller.rb to add a similar line to.
I am using ruby 4 with the gem 'protected_attributes' in place so I can use attr_accessible.
Any help would be great
Tim Smith
11,164 PointsI was developing on Rails 4.0.0 which handles things differently. I have since restarted the tutorial in Rails 3.2.15 and all is well.... so far ;)
Zachary Stites
3,130 PointsZachary Stites
3,130 PointsThe first, last, and profile_name attributes are not being populated in the database? After you added the columns in the create_user migration, did you run the migration and restart your server? Sometimes you have to restart your server for it to register the change.