Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Ruby

ActiveModel::MassAssignmentSecurity::Error in Devise::RegistrationsController#create

Generating the User Model.

I am using Rails 3.2.12 and when I follow the tutorial Generating the User Model and I create an account it is giving me a Action controller error.

Errors as follows:

Can't mass-assign protected attributes: email, password, password_confirmation

Request

Parameters:

{"utf8"=>"?", "authenticity_token"=>"yS+D885j7jNGNDkjdj4yAvVWS5yHevimStHGU9XJhgw=", "user"=>{"email"=>"useremail", "password"=>"[FILTERED]", "password_confirmation"=>"[FILTERED]"}, "commit"=>"Sign up"}

1 Answer

Hey Cheryll if I remember correctly they address this issue a little bit later in the series? Keep an eye out for

attr_accessible

for you user model in the videos.

-twiz

Thank you