Here’s what I’m trying to accomplish…
I have a person model and that peron has a home_country. Currently,
home_country is an INT in the table. What I want to be able to do is
the INT into a Country object when I pull it from the db. In order for
helper functions to work, I overloaded the object.inspect method to
default method functionality. If I called person.home_country it should
the inspect and return to me whichever method I define. This works in
script/console however, it does not work when using the helper
Couple of questions: Is there a better way to do this? And why do I
different behavior in the console and the HTML results?
Thanks for your help.