Module: Para::FormBuilder::Ordering

Defined in:
lib/para/form_builder/ordering.rb

Instance Method Summary collapse

Instance Method Details

#orderable?Boolean

Returns:

  • (Boolean)


4
5
6
# File 'lib/para/form_builder/ordering.rb', line 4

def orderable?
  options.fetch(:orderable, object.class.orderable?)
end

#reorder_anchor(options = {}) ⇒ Object



8
9
10
11
12
# File 'lib/para/form_builder/ordering.rb', line 8

def reorder_anchor(options = {})
  return "" unless orderable?
  options[:form] = self
  template.reorder_anchor(options)
end