Module: Locomotive::SimpleForm::HeaderLink

Included in:
ArrayInput, EditableSelectInput
Defined in:
lib/locomotive/simple_form.rb

Instance Method Summary collapse

Instance Method Details


22
23
24
25
26
27
28
29
30
# File 'lib/locomotive/simple_form.rb', line 22

def _header_link(name, type)
  if _options = options[name]
    label = _options[:label] || I18n.t(:edit, scope: ['locomotive.shared.form', type])
    url   = _options[:url]
    template.link_to(label, url, class: 'action')
  else
    ''
  end
end