lib/sexy_buttons/view_helpers.rb
# Returns a stylesheet link tags for the sexy button styles
# 
# Provide themes you want to load. For example this will load themes "one", "two", "theme_three"
#
#   sexy_buttons_stylesheet_link_tag "one", "two", "theme_three"
#
# If you want to load all themes from public/stylesheets/sexy_buttons/themes dir use <tt>:all</tt> as themes
#
#   sexy_buttons_stylesheet_link_tag :all
#
# If you ommit themes only default theme will be loaded
#
# See http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html#M001687 for more info
Returns a stylesheet link tags for the sexy button styles
Provide themes you want to load.



If you want to load all themes from public/stylesheets/sexy_buttons/themes dir use :all as themes



If you ommit themes only default theme will be loaded


Returns a stylesheet link tags for the sexy button styles Provide themes you want to load . If you want to load all themes from public / stylesheets / sexy_buttons / themes dir use : all as themes If you ommit themes only default theme will be loaded
def sexy_buttons_stylesheet_link_tag(*themes)
      if themes.first.to_s == "all"
        themes = Dir.entries("#{SexyButtons.public_root}/themes").delete_if { |e| !File.directory?("#{SexyButtons.public_root}/themes/#{e}") or e.match(/^\./) }
      end
      themes.delete(SexyButtons.default_theme)
      themes.unshift(SexyButtons.default_theme)
      themes = themes.collect { |t| "#{SexyButtons.public_url}/themes/#{t}/style" }
      themes.unshift("#{SexyButtons.public_url}/style")
      links = stylesheet_link_tag(*themes)
    end
def sexy_buttons_stylesheet_link_tag ( * themes ) if themes . first . to_s == "all" themes = Dir . entries ( "#{SexyButtons.public_root}/themes" ) . delete_if { | e | ! File . directory? ( "#{SexyButtons.public_root}/themes/#{e}" ) or e . match ( / ^ \. / ) } end themes . delete ( SexyButtons . default_theme ) themes . unshift ( SexyButtons . default_theme ) themes = themes . collect { | t | "#{SexyButtons.public_url}/themes/#{t}/style" } themes . unshift ( "#{SexyButtons.public_url}/style" ) links = stylesheet_link_tag ( * themes ) end
Returns a stylesheet link tags for the sexy button styles
Provide themes you want to load.
Returns a stylesheet link tags for the sexy button styles Provide themes you want to load .
themes
<not_specific>