Rails: Tableless model that calls other models

后端 未结 1 766
我寻月下人不归
我寻月下人不归 2021-01-26 13:20

I have a Rails app with a few model classes (e.g. Category, Subcategory, User, etc.). In order to implement a not-too-trivial filter funct

相关标签:
1条回答
  • 2021-01-26 14:13

    I wonder if you want ::Category - getting Category from the top-level namespace rather than scoping it to FilterCategory?

    If your models are in the app/models directory, you shouldn't need to explicitly require them - Rails already takes care of that.

    0 讨论(0)
提交回复
热议问题