Module: AdminFuHelper

Defined in:
app/helpers/admin_fu_helper.rb

Instance Method Summary collapse

Instance Method Details

#button_tag(text, options = {}) ⇒ Object



13
14
15
16
17
18
# File 'app/helpers/admin_fu_helper.rb', line 13

def button_tag(text, options = {})
  icon = options.include?(:icon) ? image_tag("/images/admin/iconic/#{options.delete(:icon)}_16x16.png", :alt => nil) : ''
  text = (:span, text)

  (:button, icon.html_safe + text.html_safe, options)
end

#evaluate_path(path) ⇒ Object



3
4
5
6
7
8
9
10
11
# File 'app/helpers/admin_fu_helper.rb', line 3

def evaluate_path(path)
  if path.nil?
    '#'
  elsif self.respond_to?(path)
    self.send(path)
  else path
    path      
  end
end