Jon Seidel wrote:
> I've done all that;

Done all what?  You failed to quote what you were referring to.

> but since this is an ActiveRecord object, I was
> hoping there was a way to do this in one spot,

There is.  Use the constructor as I already suggested.  Do you not know 
how to do this?

> through a Rails hook,
> rather than having to remember to code this each time.

Right.  That's what constructors do.

> 
> The way I encapsulated all this was to create an initialize_to_zeros
> method and now I call that each time after doing a model.new

Unnecessary.  Just put that in the constructor.

> 
> ...jon
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to