I never knew how this worked nor heard of Eigenclass but have used find_by…. Nice clear explanation 🙂
There is a point in a Ruby-ist’s life where you dig a little too deep into the depths of metaprogramming.
Sometimes the result is incredibly cool, like Rails. Rails uses a lot of metaprogramming in order to save you a lot of effort.
For example, there’s some nifty work being done in order to create the find_by methods through combining method_missing and the Eigenclass. This particular post is about the Eigenclass but you can find a pretty good explanation of method_missing here. But for more about Eigenclass, read on.
View original post 345 more words