Ruby on rails 活动记录协会
添加到您的文章类:Ruby on rails 活动记录协会,ruby-on-rails,ruby,activerecord,Ruby On Rails,Ruby,Activerecord,添加到您的文章类: ActiveModel::MassAssignmentSecurity::Error in ArticlesController#create Can't mass-assign protected attributes: depot, famille 我认为它应该是可访问的:代码,:名称,:仓库id,:家庭id,但仍然是相同的问题!对不起,打错了。你确定它坏了吗?你能发布你的控制器操作吗?你能从视图中显示你的表单代码吗?你是如何通过depot和familie的?你能将f.
ActiveModel::MassAssignmentSecurity::Error in ArticlesController#create
Can't mass-assign protected attributes: depot, famille
我认为它应该是可访问的:代码,:名称,:仓库id,:家庭id,但仍然是相同的问题!对不起,打错了。你确定它坏了吗?你能发布你的控制器操作吗?你能从视图中显示你的表单代码吗?你是如何通过depot和familie的?你能将
f.text\u字段:depot
更改为f.text\u字段:depot\u id
和familie相同吗?是的,保存了一条新记录,但包含这些信息!!1 1 # #
ActiveModel::MassAssignmentSecurity::Error in ArticlesController#create
Can't mass-assign protected attributes: depot, famille
attr_accessible :code, :designation, :depot_id, :famille_id