Refactored two class methods into scopes (to achieve a better 'rails way')
Also added some tests to the methods
Merge remote-tracking branch 'upstream/master'
Merge pull request #928 from jd-erreape/master

Refactored some class methods to scopes in order to achieve a better 'Rails way'