On Jan 23, 2011, at 11:00 PM, Mark Sobkowicz wrote: > This works fine. Now I'm trying to link the name of the item to the show > page of the rental. The rental is really just an aggregator - it belongs_to > item, belongs_to user, has_many invoices, has_many payments. But what it > doesn't have is a name. I want to list rentals, but have their item's name > be the link. I'm quite frustrated by trying to do this, because I expect > its simple. One thing I tried was to surround the <view:item/> with an > <a:rental> tag - but a always seems to replace its context with what it > surrounds. I also just tried putting in the rental model: > > def name > item.name > end
Not sure why that's not working. Here's an example of a card that should work (this is for Rental): <h4 param="heading"><a><view:name /></a> - <view:item.serial /></h4> You may also want to try using the :type argument to attr_accessor to prod the system a little: attr_accessor :name, :type => :string def name item.name end --Matt Jones -- You received this message because you are subscribed to the Google Groups "Hobo Users" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/hobousers?hl=en.
