Updated scope declarations to work with 3.x Rails