Deprecation fix for rails >= 3

Hi,

on rails versions above 3 we are getting deprecation warnings for the named scopes. I have fixed that and would like to use the updated version for a rails 4 project with refinerycms. I hope this PR gets merged and published soon.


Cheers,
  Thomas