Re: How to delete nested resource?

Thorsten Mueller
Fri, 21 Mar 2008 10:42:24 -0000

but i''m not sure, if you need that here.
why hand over the asset.id, if it''s stored in @news anyway
you could simply call the thing for @news
and in destroy use @news.asset

or in the has_one declaration simply add:
has_one :asset, :dependent => destroy
and you''ll never have to think about it again...
--
Posted via http://www.ruby-forum.com/.