Nested resources with class_name problem
Reported by Marcin Baliński | July 19th, 2008 @ 12:22 PM | in No-Milestone-Assigned
The problem occurs when you are using class_name parameter in routes definitions. Consider route like this:
map.resources :students do |student|
student.resource :profile, :class_name => 'StudentProfiles'
end
it seems that rspec can't recognize the correct route for this and throws RoutingError - No route matches parameters whenever you try to write spec for StudentProfilesController.
if you use :controller instead of class_name everything seems to be ok and problem dissappears.
Comments and changes to this ticket
-
Pat Maddox August 11th, 2008 @ 09:23 PM
- → State changed from new to invalid
Please see http://api.rubyonrails.com/class... - :class_name is not a valid option.
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
Behaviour Driven Development for Ruby.
