0

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.

CV-Gate
  • 1,162
  • 1
  • 10
  • 19

1 Answers1

1

Maybe I misunderstand your question, but have you tried

@enterprise = Backend::Enterprise.find(1)

?

janfoeh
  • 10,243
  • 2
  • 31
  • 56