Sha256: 0a7f4a8181611bb8de46cf555f4827616103a55e5e5145ada7f3ea06f8272a49
Contents?: true
Size: 522 Bytes
Versions: 2
Compression:
Stored size: 522 Bytes
Contents
Rails.application.routes.draw do Rails::Brochure::HomeContent.templates.each do |page_path| action_name = page_path.gsub(/(\/|-)/,'_') # slashes and dashes become underscores get "/#{page_path}" => "home##{action_name}", :as => action_name.to_sym HomeController.class_eval { define_method action_name.to_sym do render "home/#{page_path}" end } end get '*a', :to => 'home#four_zero_four' unless defined?(NONBROCHURE404) && Rails.application.config.consider_all_requests_local end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rails-brochure-0.4 | config/routes.rb |
rails-brochure-0.3 | config/routes.rb |