Skip to content
This repository

Mass assignment protection fails tests #204

Closed
safarista opened this Issue · 9 comments

4 participants

Nelson Kelem Philip Arndt Josh Adams John Gadbois
Nelson Kelem
"forum"=>{"category_id"=>"1", "title"=>"Buying Land", "description"=>"This is the section you will buy if you want one.", "moderator_ids"=>["3", ""]}, "commit"=>"Create Forum"}

ERROR

ActiveModel::MassAssignmentSecurity::Error (Can't mass-assign protected attributes: category_id, title, description, moderator_ids):

The whole thing needs testing for mass assignment.

Philip Arndt
Collaborator
Nelson Kelem
Josh Adams
Collaborator

Yeah, I saw it all failing yesterday so I made sure my Gemfile was looked to rails 3.2.1 since I didn't have time to fix it yesterday

Nelson Kelem
Philip Arndt
Collaborator
Josh Adams
Collaborator

in my defense, I'm presently hospitalized. (yeah, I went there)

John Gadbois

@safarista - are you going to be able to work on this soon? If not, I can look at it today.

Josh Adams knewter closed this
Josh Adams
Collaborator

This was fixed with the above pull request, closing.

Nelson Kelem

Sorry double post just in case.

Just had a look and this comes up. This pull seams to break
URL: http://localhost:3000/forums/forums/1/topics/new
ERROR undefined method forem_auto_subscribe?' for #<User:0x000001285548e8>

{"utf8"=>"✓",
 "authenticity_token"=>"3tTj+Kj3qZi4jhISeEG7aaT7QOlb/1CgX1Q9n3LrnyQ=",
 "topic"=>{"subject"=>"wasa",
 "posts_attributes"=>{"0"=>{"text"=>"mamamama"}}},
 "commit"=>"Create Topic",
 "forum_id"=>"4"}

Will have a dig but if anyone has time before tomorrow go ahead and dig. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.