> def inc_link_count > li = Link.find(params[:ID]) > li.count++ > li.save > end
To avoid multiple connections stepping on one another, you should consider using update_counters (or a custom method that does the same thing) instead of doing a find, modifying, and saving. Peace. -- 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 -~----------~----~----~----~------~----~------~--~---

