On 6 November 2010 22:15, Peter Ehrlich
<lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>
wrote:> 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?
Provide an instance method of ItemSupplier, called name, that returns
item.name. Don''t forget to check for item nil.
Colin
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.