Module: Blot::Helpers::Button
- Included in:
- Blot::Helpers
- Defined in:
- lib/blot/helpers/button.rb
Instance Method Summary collapse
Instance Method Details
#button(label, path, options = {}) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/blot/helpers/button.rb', line 4 def (label, path, ={}) size = .delete(:size).to_s size += '-button' if size != 'button' color = .delete :color radius = .delete :radius content_tag :table, class: "#{size} #{color} #{radius}".squish do content_tag :tr do content_tag :td do link_to label, path, end end end end |