小编Mik*_*ner的帖子

如何为belongs_to禁用default_scope?

有没有办法禁用default_scope单个belongs_to关联?该default_scope是好的,但所有的单一belongs_to,我想绕过范围.我很熟悉,with_exclusive_scope但我认为不能与belongs_to一起使用.

有什么建议?

上下文:我试图允许acts_as_revisable中branch_source关联指向不是最新的修订(是错误的).revisable_is_current

ruby-on-rails

40
推荐指数
3
解决办法
1万
查看次数

标签 统计

ruby-on-rails ×1