On Tue, May 09, 2006 at 07:41:41PM -0500, Jeff Hall wrote:
> ActiveRecord::Base#define_read_method(symbol, attr_name, column)  
> generates reader code for an attribute after Rails realizes there  
> should be a reader method for it, correct?  But the generated reader  
> method body does not call read_attribute... instead it accesses the  
> attribute directly and performs a type cast (if necessary)
> 
> Is this intended?  Am I missing something that read_attribute is  
> doing that is not appropriate for a defined attribute reader method?
> 
> It's near trivial to draft a patch for this - however, I wanted to  
> make sure I wasn't vastly underestimating something.
> Comments?

Stefan Kaes implemented the reader method option for performance reasons. He
would know if his chosen implementation is intentional (for performance)
rather than using read_attribute or incidental.

marcel
-- 
Marcel Molina Jr. <[EMAIL PROTECTED]>
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core

Reply via email to