mercredi 10 février 2016

Rails scoping by each week in a calendar year

I'm looking to implement the by_star gem to extend ActiveRecord. I need to be able to scope each of the 52 weeks in a year. Can this gem do this and if so how does it work. An example would be scoping objects for week 1, 2, 3 (all the way up to 52) for the current calendar year.

Or is there a better way to write scopes to handle this sort of functionality?

Aucun commentaire:

Enregistrer un commentaire