Hello! Here's come code:
ItemSupplier.first.item.name # returns name
I want:
ItemSupplier.first.name
To return the same name. Is it possible to do that?
Thanks a bunch, --Peter
(Ruby 1.8.7, Rails 2.3.8)
Hello! Here's come code:
ItemSupplier.first.item.name # returns name
I want:
ItemSupplier.first.name
To return the same name. Is it possible to do that?
Thanks a bunch, --Peter
(Ruby 1.8.7, Rails 2.3.8)
Provide an instance method of ItemSupplier, called name, that returns item.name. Don't forget to check for item nil.
Colin