Sha256: 28a276cdcf5c0070cd5de3ea28c4c269ae0711c76453ad1467473212cf284304

Contents?: true

Size: 602 Bytes

Versions: 5

Compression:

Stored size: 602 Bytes

Contents

module ThemeSupport
  module RoutingExtensions
    def themeing
      @set.with_options :controller => 'theme' do |theme|       
        match '/themes/:theme/images/*filename', :to => 'theme#images', :as => 'theme_images'
        match '/themes/:theme/stylesheets/*filename', :to => 'theme#stylesheets', :as => 'theme_stylesheets'
        match '/themes/:theme/javascripts/*filename', :to => 'theme#javascript', :as => 'theme_javascript'
        match '/themes/*whatever', :to => 'theme#error'
      end
    end
  end
end

ActionDispatch::Routing::Mapper.send :include, ThemeSupport::RoutingExtensions

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
theme_support-3.0.4 lib/theme_support/patches/routeset_ex.rb
theme_support-3.0.3 lib/theme_support/patches/routeset_ex.rb
theme_support-3.0.2 lib/theme_support/patches/routeset_ex.rb
theme_support-3.0.1 lib/theme_support/patches/routeset_ex.rb
theme_support-3.0.0 lib/theme_support/patches/routeset_ex.rb