On 12 Nov 2008, at 12:06, Mattias Bud wrote:

>
> This is because I in my edit view of the post also have a control  
> panel
> for managing the comments (ajax). If a comment here is removed  
> (without
> reloading the page and then also the post) the posts counter cache is
> updated alongside with its lock_version. If I then try to save the  
> post
> its stale (StaleObjectError).
>
> So I'm looking for a way to be able to update the comments counter  
> cache
> on the post model without changing the lock_version.
>
>
I think you're better off fixing this properly than hacking around  
with lock_version. If you post the salient parts of the code someone  
might be able to offer a suggestion.

Fred
>
>
> -- 
> 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 rubyonrails-talk@googlegroups.com
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