• Fun with Delegate Methods
    Posted on 30th January 2010

    Fun with Delegate Methods

    Earlier this week, I needed to expose methods on an instance variable in a Rails Model. The details of why I needed to aren’t as interesting as the options for implementation. Lets’s take a look. The first option is to create individual methods that delegate to the instance variable. This option is probably the easiest

  • Encapsulation With Named Scopes
    Posted on 21st December 2009

    Encapsulation With Named Scopes

    Named Scopes. What's not to love?