Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ActiveModel::MassAssignmentSecurity::Error in HomeworksController#create #480

Open
Brainstorm00 opened this issue Jun 13, 2014 · 1 comment

Comments

@Brainstorm00
Copy link

Hi everybody,

I have this error when I try to create something with my new activity

Can't mass-assign protected attributes: author_id, user_author_id, owner_id
Rails.root: /Users/project/social_stream-started

Application Trace | Framework Trace | Full Trace
Request

Parameters:

{"utf8"=>"✓",
"authenticity_token"=>"wb37v0nNpMb3dVu3EEPKt3IDdnxXoYhUM9HwzSDdvyk=",
"homework"=>{"type"=>"1",
"activity_object_id"=>"1",
"file_file_name"=>"1",
"file_content_type"=>"1",
"file_file_size"=>"1",
"file_processing"=>"0"},
"commit"=>"Create Homework"}

what does it wants ? :D

@abelard2008
Copy link

I am not sure some one will meet the same question as mine. After I run "rails g scaffold Xoxo ...", some other steps as described in How to add new activity objects and access "http://127.0.0.1/xoxos/new", I got the above error. The resolution is simple: Delete models/xoxo.rb's one line with "attire_accessible" like:

attr_accessible :draft, :json, :title

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants