Ruby on Rails
Monday, September 3, 2012
So, I have a model, and I've defined some non-persisted attributes. I'd like to augment the to_s to include these in to_s and other output statements (like whatever awesome print is calling).
If possible, I'd like to augment the existing functionality (vs replacing it)? Is there a standard way to do this? I can probably figure out how to do this if someone could point me to where to_s is being defined in ActiveRecord.
Thanks,
-- 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-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/rgUP8LOyj1wJ.
For more options, visit https://groups.google.com/groups/opt_out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment