I have a user model:
class User < ActiveRecord::Base
end
This model is used to store all the corporate users
Then I would like to have another user model inside my workplace namespace:
class Workplace::User < ActiveRecord::Base
end
This class would be used for the users of my users in their workplace
It doesn’t work and rises following error message when I want to migrate:
Expected .../app/models/workplace/user.rb to define User
I don’t have this issue with models using different names but I want to use the same name (makes more sense to me…)
How could I? Thanks!!!
When you declare classes in a name space, rails expects the files for the MVC to be placed in a folder with the same name as the namespace.
Try placing them in