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

Domnick Knowlton
Courses Plus Student 2,437 PointsNo method Error!
I am getting a new method error for the attr_accessible part, I did do the RVM thing to 1.9.3. However, I did have to add the attr_accessible part in. This is the error.
http://gyazo.com/24d21f86a0f1746cbe01dad0bd39cfaa
Then here is my code to the user.RB file.
class User < ActiveRecord::Base # Include default devise modules. Others available are: # :confirmable, :lockable, :timeoutable and :omniauthable devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable
attr_accessible :first_name, :last_name, :profile_name
end
2 Answers

Stefan Legg
3,168 PointsAre you using Rails > 4.0?
From the Rails Guides:
Rails 4.0 has removed attr_accessible and attr_protected feature in favor of Strong Parameters. You can use the Protected Attributes gem for a smooth upgrade path.

Maciej Czuchnowski
36,441 PointsNot enough information. What version of Rails? What does this relate to (course? video?).
Domnick Knowlton
Courses Plus Student 2,437 PointsDomnick Knowlton
Courses Plus Student 2,437 PointsThanks, I'll let you know if this works!
Edit: It works!