Sha256: 9ac14bec5ed689c1b72ba6948b553b792ef929215f22b77e691bb385c8515f85

Contents?: true

Size: 793 Bytes

Versions: 4

Compression:

Stored size: 793 Bytes

Contents

class ActionController::Routing::RouteSet

  alias_method :__reload, :reload

  def reload
    __reload
    install_theme_routes
  end

  def create_theme_routes    
    named_route 'theme_images', "/themes/:theme/images/:filename", :controller=>'theme_system/theme', :action=>'images'
    named_route 'theme_stylesheets', "/themes/:theme/stylesheets/:filename", :controller=>'theme_system/theme', :action=>'stylesheets'
    named_route 'theme_javascript', "/themes/:theme/javascript/:filename", :controller=>'theme_system/theme', :action=>'javascript'

    connect "/themes/*", :controller=>'theme_system/theme', :action=>'error'
  end

  def install_theme_routes
    create_theme_routes
    write_generation
    write_recognition
    ActionController::Routing::NamedRoutes.install
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
theme_generator-1.1.1 templates/routeset_ex.rb
theme_generator-1.2.1 templates/routeset_ex.rb
theme_generator-1.2.0 templates/routeset_ex.rb
theme_generator-1.2.2 templates/routeset_ex.rb