Sha256: 77ace6b462116d6b8b6aa8eecd9efc619282038cddbaf6fecaa40267bac05b27

Contents?: true

Size: 824 Bytes

Versions: 2

Compression:

Stored size: 824 Bytes

Contents

module ThemesForRails
  module UrlHelpers
    extend ActiveSupport::Concern
    included do
      include ThemesForRails::CommonMethods
      helper_method :current_theme_stylesheet_path, 
        :current_theme_javascript_path, 
        :current_theme_image_path
    end
    module InstanceMethods
      def current_theme_stylesheet_path(asset)
        base_theme_stylesheet_path(:theme => self.theme_name, :asset => asset, :extension => 'css')
      end
      def current_theme_javascript_path(asset)
        base_theme_javascript_path(:theme => self.theme_name, :asset => asset, :extension => 'js')
      end
      def current_theme_image_path(asset)
        image, extension = asset.split(".")
        base_theme_image_path(:theme => self.theme_name, :asset => image, :extension => extension)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
themes_for_rails-0.2.2 lib/themes_for_rails/url_helpers.rb
themes_for_rails-0.2.1 lib/themes_for_rails/url_helpers.rb