There have been a lot discussion about this a while ago. However, we couldn't find the way to determine the correct route to use when you have a singular resource, so it was left unfixable.
The solution you'll have to do is to use `:url` form_for @alpha, :url => alpha_path On Tue, Jul 12, 2011 at 4:23 PM, elfo <[email protected]> wrote: > There seems to be a small bug with has_one relationships and resource > in the routes. > Example: > > where beta has_one alpha > > In routes: > resource alpha > > In view: > > form_for @alpha --> automatic link is alpah_path(id) and not > alpha_path > and in this case since there is no id in the route, the id takes the > place of the format param -> /alpha.1 > > Thanks! > Mike > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-core?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
