Maybe I misunderstand your question, but have you tried
@enterprise = Backend::Enterprise.find(1)
?
Pregunta
I have this model:
class Backend::Enterprise < ::Enterprise
How could I call and instantiate this model in its namespace?
If I write, in backend_enterprises_controller
:
@enterprise = Enterprise.find(1)
It calls to the model:
class Enterprise < ActiveRecord::Base
And I'd like to have separated methods in each namespace model.
Is it possible? I'm using Rails 3.2.14 and inherited_resources gem.
Thanks.
Solución
Maybe I misunderstand your question, but have you tried
@enterprise = Backend::Enterprise.find(1)
?