Sha256: d92f897e12dddb44790c4549eff3bb16140a7e3002e2cbd1a92b95008d9ee420

Contents?: true

Size: 726 Bytes

Versions: 3

Compression:

Stored size: 726 Bytes

Contents

# encoding: utf-8
module ThemesForRails
  module UrlHelpers

    extend ActiveSupport::Concern
    
    included do
      helper_method :current_theme_stylesheet_path, 
        :current_theme_javascript_path, 
        :current_theme_image_path
    end
    
    def current_theme_stylesheet_path(asset)
      base_theme_stylesheet_path(:theme => self.theme_name, :asset => "#{asset}.css")
    end

    def current_theme_javascript_path(asset)
      base_theme_javascript_path(:theme => self.theme_name, :asset => "#{asset}.js")
    end

    def current_theme_image_path(asset)
      image, extension = asset.split(".")
      base_theme_image_path(:theme => self.theme_name, :asset => "#{image}.#{extension}")
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
themes_for_rails-0.5.1 lib/themes_for_rails/url_helpers.rb
themes_for_rails-0.5.0 lib/themes_for_rails/url_helpers.rb
themes_for_rails-0.5.0.pre lib/themes_for_rails/url_helpers.rb