mbleigh / subdomain-fu

A new plugin approach to attempting to solve the usage of subdomains in linking and routing in Rails projects.
http://rdoc.info/projects/mbleigh/subdomain-fu
Other
586 stars 118 forks source link

:conditions are not inherited by nested resources #9

Open jeanmartin opened 14 years ago

jeanmartin commented 14 years ago

Given the following routes: map.subdomain :api do |api| api.resources :projects do |project| project.resources :tasks end end

When I look at the conditions of api_project_tasks_path() Then I should see { :subdomain => /api/ }

fails.

api_projects_path() has the conditions. This seems to be because the :conditions option is not inherited in nested resources. I could fix this by adding: ActionController::Resources::INHERITABLE_OPTIONS << :conditions to an initializer.