module UsefulHelpers::Helpers::FormtasticHelper
Public Instance Methods
actions_for(form, label=nil)
click to toggle source
# File lib/useful_helpers/helpers/formtastic_helper.rb, line 25 def actions_for(form, label=nil) print_label = label ? label : nil html = "" html += form.actions do submit_for(form, print_label) + cancel_for(form) end raw html end
cancel_for(form, label=nil)
click to toggle source
# File lib/useful_helpers/helpers/formtastic_helper.rb, line 42 def cancel_for(form, label=nil) print_label = label ? label : "Отмена" form.action :cancel, :as => :link, :label => print_label, :button_html => {:class => "a_button cancelite"} end
submit_for(form, label=nil)
click to toggle source
# File lib/useful_helpers/helpers/formtastic_helper.rb, line 34 def submit_for(form, label=nil) print_label = label ? label : "Отправить" form.action :submit, :as => :button, :label => raw("<span class='b-btn__wrap g-dib'>#{print_label}</span>"), :button_html => {:class => "b-btn _blue g-dib"} end