Module: Cocooned::Helpers::Tags::Down
- Defined in:
- lib/cocooned/helpers/tags/down.rb
Overview
Helpers to generate action triggers to move items down in a nested form.
Signatures
{method}(label, form, options = {})
# Explicit name
{method}(form, options = {}) do
# Name as a block
end
{method}(form, options = {})
# Use default name
Parameters
‘label` is the text to be used as the link label. See the main documentation for Cocooned::Helpers::Tags for more about labelling.
‘form` is your form builder. Can be a SimpleForm::Builder, Formtastic::Builder or a standard Rails FormBuilder.
Instance Method Summary collapse
-
#cocooned_move_item_down_button(*args, &block) ⇒ Object
Output a button to move an item down.
-
#cocooned_move_item_down_link(*args, &block) ⇒ Object
Output a link to move an item down.
Instance Method Details
#cocooned_move_item_down_button(*args, &block) ⇒ Object
Output a button to move an item down.
Signatures
(label, form, = {})
# Explicit name
(form, = {}) do
# Name as a block
end
(form, = {})
# Use default name
See Cocooned::Helpers::Tags::Add main documentation for a reference of supported parameters.
See the documentation of ActionView::Helpers::FormBuilder#button for valid options.
70 71 72 |
# File 'lib/cocooned/helpers/tags/down.rb', line 70 def (*args, &block) (Cocooned::Tags::Down, *args, &block) end |
#cocooned_move_item_down_link(*args, &block) ⇒ Object
Output a link to move an item down.
Signatures
cocooned_move_item_down_link(label, form, = {})
# Explicit name
cocooned_move_item_down_link(form, = {}) do
# Name as a block
end
cocooned_move_item_down_link(form, = {})
# Use default name
See Cocooned::Helpers::Tags::Down main documentation for a reference of supported parameters.
See the documentation of ActionView::Base#link_to for additional options.
47 48 49 |
# File 'lib/cocooned/helpers/tags/down.rb', line 47 def cocooned_move_item_down_link(*args, &block) cocooned_link(Cocooned::Tags::Down, *args, &block) end |