【发布时间】:2012-06-21 16:47:55
【问题描述】:
我有点像个小鬼,我正在尝试利用 bokmann 的 rails3_fullcalendar 在 rails 3.2 中创建日历应用程序,但是当我尝试在我的应用程序中创建事件时,我收到了这个错误:
ActiveModel::MassAssignmentSecurity::Error in EventsController#create
Can't mass-assign protected attributes: title, description, starts_at(1i), starts_at(2i),
starts_at(3i), starts_at(4i), starts_at(5i), ends_at(1i), ends_at(2i), ends_at(3i), ends_at(4i),
ends_at(5i), all_day
{"utf8"=>"✓",
"authenticity_token"=>"bq3ZUXLm4lYbja9FUafbroFF2Zwt8iMw6GWfvoRuPLA=",
"event"=>{"title"=>"sddfsdf",
"description"=>"df",
"starts_at(1i)"=>"2012",
"starts_at(2i)"=>"6",
"commit"=>"Create Event"}
该解决方案看起来像 it should be this,但通过 AJAX POST(它正在发送)传递 AUTH_TOKEN,但它仍然无法正常工作。
有什么想法吗?
【问题讨论】:
标签: ruby-on-rails jquery ruby-on-rails-3.2