Scoping two models on approved
- by Shaun Frost Duke Jackson
I have three models (Book,Snippet,User) and I'd like to create a scope for where(:approved = true)
I'm doing this so I can use the merit gem to define ranking based on count of approved.
I'm thinking that writing this as a scope might be to complex but I don't know as I've just started leaning scopes.
I've currently got this in my Book &…