module Iconoclast module IconHelper # Insert an image tag with an icon with name equal to "name" param and # extension .png, with alt attribute and options. # Example: # <%= icon :information, "Information icon", :border => 0 %> # will generate: # Information icon def self.icon(name, alt = nil, opts = {}) opts[:border] ||= 0 opts[:align] ||= "bottom" opts[:alt] ||= alt image_tag "../icons/#{name}.png", opts end end end