Rails: organizing models in subfolders having warning: toplevel constant A referenced by B::A

前端 未结 2 427
半阙折子戏
半阙折子戏 2021-01-17 11:08

Today I decided to reorganize big amount of user related models and I\'m having a problem with it.

Before I had such structure:

app/models/user.rb
ap         


        
2条回答
  •  情歌与酒
    2021-01-17 11:28

    Try referring to the class as User::File to distinguish it from regular ruby Files. You can use ::File to refer to those when it is ambiguous

提交回复
热议问题