Sha256: ac7877f1642bd7ed865c62b7f8181c9052dd30939e27210f711ddfcc6fb4a06a

Contents?: true

Size: 789 Bytes

Versions: 3

Compression:

Stored size: 789 Bytes

Contents

# encoding: utf-8
module ThemesForRails
  module Routes

    def themes_for_rails
      theme_dir = ThemesForRails.config.themes_routes_dir
      constraints = { :theme => /[\w\.]*/ } 
      
      match "#{theme_dir}/:theme/stylesheets/*asset" => 'themes_for_rails/assets#stylesheets', 
        :as => :base_theme_stylesheet, :constraints => constraints
      match "#{theme_dir}/:theme/javascripts/*asset" => 'themes_for_rails/assets#javascripts', 
        :as => :base_theme_javascript, :constraints => constraints
      match "#{theme_dir}/:theme/images/*asset" => 'themes_for_rails/assets#images', 
        :as => :base_theme_image, :constraints => constraints
    end

  end
end

module ActionDispatch::Routing
  class Mapper #:nodoc:

    include ThemesForRails::Routes

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

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