Skip to content

Instantly share code, notes, and snippets.

@linojon
Created April 22, 2009 13:29
Show Gist options
  • Save linojon/99793 to your computer and use it in GitHub Desktop.
Save linojon/99793 to your computer and use it in GitHub Desktop.
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