This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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