Module: Thelpers::ViewHelpers
- Defined in:
- lib/thelpers/view_helpers.rb
Instance Method Summary collapse
- #button_to(name = nil, options = nil, html_options = nil, &block) ⇒ Object
- #link_to(name = nil, options = nil, html_options = nil, &block) ⇒ Object
Instance Method Details
#button_to(name = nil, options = nil, html_options = nil, &block) ⇒ Object
9 10 11 12 |
# File 'lib/thelpers/view_helpers.rb', line 9 def (name = nil, = nil, = nil, &block) name = I18n.t("buttons.#{name}") if !block_given? && name.is_a?(Symbol) super name, , , &block end |
#link_to(name = nil, options = nil, html_options = nil, &block) ⇒ Object
4 5 6 7 |
# File 'lib/thelpers/view_helpers.rb', line 4 def link_to(name = nil, = nil, = nil, &block) name = I18n.t("links.#{name}") if !block_given? && name.is_a?(Symbol) super name, , , &block end |