Module: ButtonLinkTo::Helper
- Defined in:
- lib/button_link_to/helper.rb
Instance Method Summary collapse
Instance Method Details
#button_link_to(name = nil, options = nil, html_options = nil, &block) ⇒ Object
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/button_link_to/helper.rb', line 4 def (name = nil, = nil, = nil, &block) , = , name if block_given? ||= {} = (, ) url = url_for() .merge!({"data-url" => url, :type => "button"}) content_tag(:button, name || url, , &block) end |