Skip to content

Emery's Insights

Good Coding Practices, Software Design, and the Software industry.

Archive

Tag: Plugin

conflict_warnings is a Ruby on Rails plugin I wrote that addresses the shortcomings of optimistic locking when dealing with user actions that span multiple HTTP requests.

Rails provides optimistic locking as a method of ensuring that multiple changes to the same record at approximately the time do not clobber each other. The method that Rails sever uses to handle requests, renders optimistic locking useless in situations where it’s most needed.

I patched CollectiveIdea’s acts_as_audited Ruby On Rails plugin to include audit comments. A blog post about a fork isn’t the proper way to get your work accepted upstream. But the project maintainer doesn’t have the best track record with pulling from the community, and I felt this was worth sharing. Read on for Installation and usage notes.