Sha256: 62e0ab6caa44eb7cceed2b40d2baca60aff87e26b54c7fe78d2bbc82160ac434
Contents?: true
Size: 1.57 KB
Versions: 1
Compression:
Stored size: 1.57 KB
Contents
begin require File.dirname(__FILE__) + '/../../../../spec/spec_helper' #rescue LoadError # puts "You need to install RSpec in your base app. Add 'rspec-rails' to your Gemfile." # exit end plugin_spec_dir = File.dirname(__FILE__) ActiveRecord::Base.logger = Logger.new(plugin_spec_dir + "/debug.log") Rails3::Application.routes.draw do |map| map.needs_subdomain '/needs_subdomain', :controller => "fu", :action => "awesome" map.no_subdomain '/no_subdomain', :controller => "fu", :action => "lame" map.needs_awesome '/needs_awesome', :controller => "fu", :action => "lame" map.resources :foos do |fu| fu.resources :bars end map.connect '/', :controller => "site", :action => "home", :conditions => {:subdomain => false} map.connect '/', :controller => "app", :action => "home", :conditions => {:subdomain => true} map.connect '/', :controller => "mobile", :action => "home", :conditions => {:subdomain => "m"} map.connect '/subdomain_here', :controller => "app", :action => "success", :conditions => {:subdomain => true} map.connect '/no_subdomain_here', :controller => "site", :action => "success", :conditions => {:subdomain => false} map.connect '/m_subdomain_here', :controller => "mobile", :action => "success", :conditions => {:subdomain => "m"} map.connect '/numbers_only_here', :controller => "numbers", :action => "success", :conditions => {:subdomain => /[0-9]+/} map.connect '/:controller/:action/:id' end class Paramed def initialize(param) @param = param end def to_param @param || "param" end end include ActionController::UrlWriter
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
subdomain-fu-1.0.0.beta2 | spec/spec_helper.rb |