Sha256: 7da8baa985741774ff916fb59762b901893f2e27587dcb42a538a48634a7439e

Contents?: true

Size: 793 Bytes

Versions: 8

Compression:

Stored size: 793 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}.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
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
themes_for_rails-0.4.3 lib/themes_for_rails/url_helpers.rb
themes_for_rails-0.4.2 lib/themes_for_rails/url_helpers.rb
themes_for_rails-0.4.1 lib/themes_for_rails/url_helpers.rb
themes_for_rails-0.4.0 lib/themes_for_rails/url_helpers.rb
themes_for_rails-0.3.1 lib/themes_for_rails/url_helpers.rb
themes_for_rails-0.3.0 lib/themes_for_rails/url_helpers.rb
themes_for_rails-0.2.5 lib/themes_for_rails/url_helpers.rb
themes_for_rails-0.2.4 lib/themes_for_rails/url_helpers.rb