使用named_scope作为匿名范围的一部分时发出警告
我有以下命名范围: named_scope :find_all_that_match_tag, lambda { |tags| { :select => "articles.id, tags.name", :joins => :tags, :conditions…
我可以在 Rails 中创建*未*命名的范围吗?
我知道您可以在 Rails 中创建命名范围,它允许您指定稍后可以构建的条件: named_scope :active, :conditions => {:active => true} ... MyModel.acti…
- 共 1 页
- 1