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 button(label, path, options={})
  size   = options.delete(:size).to_s
  size  += '-button' if size != 'button'
  color  = options.delete :color
  radius = options.delete :radius

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