search for: jobship

Displaying 1 result from an estimated 1 matches for "jobship".

2012 Aug 10
1
Merge scopes with OR
...e merging scopes with OR - currently the default way is AND. The feature seems to have been requested/reported here: https://github.com/rails/rails/issues/5545 A pull request was sent, but it needs some work. I wrote a quick attempt too here: https://gist.github.com/3312792 It uses the syntax: Jobship.includes(:job).or(Jobship.accepted, Jobship.declined).count though it might be better like this: Jobship.where(accepted.or(declined)).count Thoughts? It doesn''t look like it should be too hard - any reason why this isn''t included in the current ActiveRecord? I haven''...