This project is archived and is in readonly mode.
form_for is resolving a plural instance for a singlar resource
Reported by Sam Saffron | January 18th, 2010 @ 04:17 AM | in 3.0.2
I have this route
map.namespace :admin do |m|
m.resource :global
end
usage:
form_for [:admin, Global.instance] do |f|
...
In rails 2.3.5 this works fine, in rails 3 it is resolving the array incorrectly to admin_globals_path which causes a failure.
Comments and changes to this ticket
-
José Valim January 18th, 2010 @ 08:38 AM
- Assigned user set to josh
-
José Valim January 18th, 2010 @ 08:06 PM
- Milestone cleared.
-
josh January 19th, 2010 @ 02:27 PM
- State changed from new to wontfix
Putting any model into form_for won't "just work" anymore. Your model needs to follow the ActiveModel api. I'm guessing extending the model with "ActiveModel::Naming" should fix the issue. So make sure "Global.instance.model_name" works.
-
Jeremy Kemper October 15th, 2010 @ 11:01 PM
- Milestone set to 3.0.2
- Importance changed from to Low
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>