Ver Mensaje Individual
  #6 (permalink)  
Antiguo 24/07/2013, 15:04
Avatar de calichecal
calichecal
 
Fecha de Ingreso: junio-2009
Ubicación: Colombia
Mensajes: 288
Antigüedad: 14 años, 10 meses
Puntos: 12
Respuesta: Problema con Rails y mongoDB: mongoid y un query que no retorna nada

Cita:
Iniciado por pzin Ver Mensaje
Pues ahí está el error. Las rutas están bien, pero tienes que indicar también el controlador para que luego puedas usar tipocontenido_path.

Código Ruby:
Ver original
  1. get "tipocontenidos/index" => "tipocontenido#index"

Debería de funcionar así.

Si luego del cambio ejecutas rake routes verás que efectivamente existe tipocontenido_path. Debería de salir algo así:

Código BASH:
Ver original
  1. tipocontenido GET /tipocontenido/index(.:format) tipocontenido#index
lo hice, pero ahora me arroja en la vista:

Código:
Routing Error

uninitialized constant TipocontenidoController
Try running rake routes for more information on available routes.
y lo otro si parece estar bien:

Código:
$ rake routes
         index_index GET /index/index(.:format)          index#index
      index_registro GET /index/registro(.:format)       index#registro
tipocontenidos_index GET /tipocontenidos/index(.:format) tipocontenido#index
                root     /                               index#index
__________________
Hay una fuerza motriz más poderosa que el vapor, la electricidad y la energía atómica: la voluntad. -Einstein-