Adding a named_scope based on user preferences
Published on
Thursday, 26 November 2009 at 18:07
I recently tackled the problem in Blankless of hiding last year's gift suggestions. The problem is that I wanted to apply a named scope based on the user preferences. Further complicating things, I couldn't simply refer to that named scope wherever I needed it, because that would have involved a) a lot of repeating myself and b) a lot of hunting through every file for every reference to gifts.