Thats weired..
I would expect parent.save to return false then.. :(

Thanks for the help.

CS.

Simon Macneall wrote:
> Because the upduser is the same, it doesn't think that the object has 
> really changed, so doesn't update the timestamps.
> 
> We had a similar problem where we needed to update the timestamps on the 
> root object of a tree whenever anything in the tree changed. I ended up 
> implementing a touch method on the object, and called that in a 
> before_save hook.
> 
> 
>   def touch
>     orig_title = self.title
>     self.title = ' '
>     self.title = orig_title
>     self.save
>   end
> 
>   def after_save_hook
>     root.touch
>     true
>   end
> 
> the edge rails code looks much nicer, but it will be a while before we 
> can move to newer rails.
> 
> Simon

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to