Questions tagged [named-scopes]

17 questions
0
votes
1 answer

Rails 3.2: Chaining lambda scopes?

In my Rails 3.2.8 app I have some named scopes I would like to chain together in some circumstances. So, for example, I have these two scopes: scope :by_status, lambda { |status| if status == "All" then WorkRequest.all else…
Dan Barron
  • 1,094
  • 2
  • 15
  • 30
0
votes
1 answer

yii detecting if scope is in use

I was wondering if there's a method to detect if a scope is being used on an AR search in yii? For example, a model might contain 2 scopes: class MyModel extends CActiveRecord { ... function myScope1() { …
Stu
  • 4,160
  • 24
  • 43
1
2