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 trialWalid Johnson
6,603 PointsStuck being still logged in to add new user with profile name. Also the "protected attributes" gem need to be added
In the newer version of rails, the attr_accessible inside the user.rb file isn't in there. So i manually added it and got an error about attr_accessible not being used. After i added the gem 'protected attributes' in the Gemfile and bundle it, the error is gone. But it says I'm still logged in. How can I log out the session to see my updated on the user/sign_up page.
2 Answers
Brandon Barrette
20,485 PointsNote that the videos you are watching were written for rails 3.2. You've downloaded rails 4 (which was officially released in October) and rails now uses strong parameters (for security reasons) instead of attr_accessible.
I suggest you do one of two things:
- Develop with rails 3.2 to match the videos
- Follow along with the ODOT (Todo List App) with rails 4 FIRST, then you can go back to the Treebook app and use rails 4 (since you'll understand rails a bit more).
You may want to also do the basic ruby course first too. Best of luck in your learning!
Walid Johnson
6,603 PointsThanks for the response. I found out that there are some default things that area happening because of the change in rails 4, but after clearing my session via the development console cleared up the issue. There are some issues here and there, but so far so good. Thanks for letting me know the issue, i was wondering about the version changes.