Sha256: 2589757a6960c462372e235179b937bb6ad85196bc9ff9ac97d8d935a8afcde7

Contents?: true

Size: 457 Bytes

Versions: 1

Compression:

Stored size: 457 Bytes

Contents

module AdminFuHelper
  
  def evaluate_path(path)
    if path.nil?
      '#'
    elsif self.respond_to?(path)
      self.send(path)
    else path
      path      
    end
  end
  
  def button_tag(text, options = {})
    icon = options.include?(:icon) ? image_tag("/images/admin/iconic/#{options.delete(:icon)}_16x16.png", :alt => nil) : ''
    text = content_tag(:span, text)

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
admin_fu-0.1.0 app/helpers/admin_fu_helper.rb