change scopes to use proc so it works in rails 3 and 4
Merge pull request #85 from jotto/master

rails 4 scope patch