I have a model Post which have two attributes title
- data-type string
and description
- data-type array
ActiveAdmin.register Post do
permit_params :title, :description
form do |f|
f.inputs do
f.input :title
f.input :description
end
f.actions
end
end
Value of title
is saving properly but value of description
is not saving through the form. How to save array field?
Can I put Add more
button for description
in active admin?
尝试更改名称以接受数组
f.input :description, input_html: { name: 'description[]' }
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.