module Blot::Helpers::Button

Public Instance Methods

button(label, path, options={}) click to toggle source
# File lib/blot/helpers/button.rb, line 4
def button(label, path, options={})
  size   = options.delete(:size).to_s
  size  += '-button' if size != 'button'
  color  = options.delete :color
  radius = options.delete :radius

  content_tag :table, class: "#{size} #{color} #{radius}".squish do
    content_tag :tr do
      content_tag :td do
        link_to label, path, options
      end
    end
  end
end