Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class RecordsController < ApplicationController
def update
# TODO: remove the line below when the testing is complete
sleep(1) if 0 == params[:input].length % 2
@record = Record.find(params[:id])
@record.update(field_name: params[:input]) if params[:version_number] > @record.version_number
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment