Using Module Mixins to Extend Classes and Objects in Ruby
The module and class below demonstrate how to use instance methods and class methods from "module mixins". The thing to remember is scope. For instance, to use class methods within instance methods you need to call them from the class itself. This is acco...
Written by Sean Behan on 06/17/2012
Extending Rails Form Builders
Extending forms in Rails is simple and will greatly reduce the amount of code in your views. This example is taken right from the Agile Web Development book on Rails(2.1.*) with one minor tweak. I want to pass a label argument along with the field name so...
Written by Sean Behan on 06/17/2012