plataformatec/simple_form — Issue #509: Nested resource problem with generated route - possible bug?
Author: ejmm320
Created: 2012-03-08 20:43:10+00:00
State: open

Hi all, i have the following problem, in my routes i have:

namespace :ro do
resources :ro_registros_riesgos do
resources :ro_detalles_riesgos do
get 'obtener_nivel_riesgo_asociado', :on=> :collection
end
end
end

When i try to create a submit form like this:
simple_form_for [@ro_registro_riesgo, @ro_detalle_riesgo] do |f|...

It points to a route that doesn't exists: "ro_ro_registro_riesgo_ro_ro_detalles_riesgos_path" instead of "ro_ro_registro_riesgo_ro_detalles_riesgos_path" which appears if i do a rake routes command.

Those models are located in a folder named "ro", so i have: Ro::RoRegistroRiesgo and Ro::RoDetalleRiesgo and my controllers also are prefixed by Ro:: ...

Is this a bug? or maybe i'm missing something here, i appreciate any advice to solve this problem.

Thanks.