Created
April 22, 2009 13:29
-
-
Save linojon/99793 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
map.resources :accounts, :conditions => { :subdomain => 'www'} | |
map.resource :account, :ony => [:show], | |
:member => { | |
:activate => :get, | |
:change_level => :get, | |
:update_level => :put, | |
:confirm_close => :get, | |
:close => :delete | |
} | |
## | |
what i want is when in www. (and logged in as admin) i get all my restful 'accounts' routes | |
and when in another subdomain I have a singular resource 'account' | |
but get this regardless what subdomain i'm in | |
accounts_path => '/accounts' | |
account_path => '/account' | |
account_path(1) => NoMethodError Exception: You have a nil object when you didn't expect it! | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment