Module: KisoThemes::SimpleForm::FormBuilderExtensions

Defined in:
lib/kiso_themes/extensions/simple_form/form_builder.rb

Instance Method Summary collapse

Instance Method Details

#cancel_button(*args) ⇒ Object



4
5
6
7
8
# File 'lib/kiso_themes/extensions/simple_form/form_builder.rb', line 4

def cancel_button(*args)
  options = args.extract_options!
  url = options[:to] || :back
  template.link_to translate_required_text, url, class: 'btn'
end

#translate_required_textObject



10
11
12
# File 'lib/kiso_themes/extensions/simple_form/form_builder.rb', line 10

def translate_required_text
  I18n.t(:"simple_form.buttons.cancel", default: 'Cancel')
end