def icon(name, size=1) #icon("camera-retro") # html = " Camera Retro button class_to_add = "button #{name}" options.each { |opt| class_to_add += " #{opt}" } if !options.empty? link_to(url, html_options = { :class => class_to_add }) {icon(name, 1.5) + " " + text} end def link_icon(text, url, name, size=1, *options) #link_icon("Camera Retro button", "#","refresh",1) # Camera Retro button class_to_add = "#{name}" options.each { |opt| class_to_add += " #{opt}" } if !options.empty? link_to(url, html_options = { :class => class_to_add }) {icon(name, size) + " " + text} end