search for: old_color

Displaying 1 result from an estimated 1 matches for "old_color".

Did you mean: ole_color
2008 Apr 03
3
Overloading and wrapping an association method
Hi all: For example I have: class Color < ActiveRecord::Base belongs_to :ball end class Ball < ActiveRecord::Base has_many :colors end What I want to do is to write a method that: 1. takes the result of Ball#colors, which is an array of Color objects 2. do something with the array 3. return the result but I want to name my method Ball#colors, i.e. I want to overload the generated