Two models: Window(belongs_to :window_input) and WindowInput(has_many :windows), when I put this in routes.rb:
resources :window_inputs do
resource :window
end
the rake routes result is:
new_window_inputs_window GET /window_inputs/windows/new(.:format)
The right routing should be: /window_inputs/:window_input_id/windows/new(.:format). I wonder this error comes from the two models’ names. I use sqlite and rails 3.2.2 . Any one can help me on this?
Don’t forget when nesting to declare the second resource as a child of the first:
It’s declared as simply namespaced, not dependent, unless you refer to it that way.