Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 4th, 2012  |  syntax: None  |  size: 0.53 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1.  
  2.   def action_bar(&block)
  3.     block_content = capture(&block)
  4.     if block_content.present?
  5.       actions = content_tag(:ul, block_content) + clear_tag
  6.       concat(content_tag(:div, actions, :class => "actions actions-inline"))
  7.     end
  8.   end
  9.  
  10.   def b(icon_name, link_title, link_path = {}, opts = {})
  11.     icon_tag = if icon_name.is_a? Symbol
  12.       icon(icon_name, :alt => link_title)
  13.     else
  14.       image_tag(icon_name, :alt => link_title)
  15.     end
  16.     content_tag(:li, link_to(icon_tag + link_title, link_path, opts))
  17.   end