我有这样的表格:
revoke.html.arb
active_admin_form_for resource, url: revoke_active_admin_payment_subscription_path(resource) do |f|
f.inputs do
f.input :suspended_at, as: :datepicker, datepicker_options: { max_date: Date.today.iso8601 }
end
f.actions
end
但是视图因此错误而崩溃:
undefined method `suspended_at' for #<Forms::Payment::SubscriptionForm:0x00007f36462aaae8>
Did you mean? suspended_at_from_model
如果我更改为使用suspended_at_from_model
页面加载,但输入的名称、ID 和标签都不suspended_at_from_model
是简单的suspended_at
为什么表单不能接受suspended_at
输入?