docs/5-forms.md in activeadmin-2.8.1 vs docs/5-forms.md in activeadmin-2.9.0
- old
+ new
@@ -108,12 +108,13 @@
f.has_many :taggings, sortable: :position, sortable_start: 1 do |t|
t.input :tag
end
end
f.inputs do
- f.has_many :comment,
+ f.has_many :comments,
new_record: 'Leave Comment',
+ remove_record: 'Remove Comment',
allow_destroy: -> (c) { c.author?(current_admin_user) } do |b|
b.input :body
end
end
f.actions
@@ -136,9 +137,13 @@
`false`.
The `:new_record` option controls the visibility of the new record button (shown
by default). If you pass a string, it will be used as the text for the new
record button.
+
+The `:remove_record` option controls the text of the remove button (shown after
+the new record button is pressed). If you pass a string, it will be used as the
+text for the remove button.
The `:sortable` option adds a hidden field and will enable drag & drop sorting
of the children. It expects the name of the column that will store the index of
each child.