Thaddeus.net Blog

A random brain dump of ideas that are too long to be tweets
Showing results tagged with code (show all results)

Adding a named_scope based on user preferences

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.

Disclaimer The contents of this blog are entirely my own creation (except where otherwise cited) and neither represent the opinions of nor are endorsed by my employer, family, friends, or any other entity. If you don't like something I have to say, then you only have me to blame.