我媒體鏈接閱讀前面回答how to permit an array with strong parameters但使用params.permit,從使用Rails 4.2 byebug會議上,我不知道這情況: 我怎麼能提取評論參數? (byebug) params
{"comments"=>"[{\"comment\":\"ndjsnjakldnfljkasdbfhjae\",\"date\":
我有一個factor控制器,其採用因子值對於兩種不同類型的因素 主要因素 次要因素 存在PARAMS和我將它們作爲params如下: class FactorController < AdminController
def create
if primary_factor_params ## LINE 5
do something
elsi
我有一個名爲note.rb如下模式: class Note < ApplicationRecord
belongs_to :user
has_many :tags
accepts_nested_attributes_for :tags
end
,也是一個型號命名tag.rb: class Tag < ApplicationRecord
belongs_