Module: HelpersView::RenderButton
- Included in:
- RailsHtml
- Defined in:
- lib/helpers_view/render_button.rb
Overview
module RenderButton
Instance Method Summary collapse
Instance Method Details
#render_button_html(options = { text: 'Button', class: 'btn btn-primary', onclick: '', id: '', style: '' }, &block) ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/helpers_view/render_button.rb', line 6 def ( = { text: 'Button', class: 'btn btn-primary', onclick: '', id: '', style: '' }, &block) [:class] = () [:type] = () tag.(class: [:class], onclick: [:onclick], id: [:id], style: [:style], type: [:type]) do if block_given? yield else () end end end |