Skip to content

Instantly share code, notes, and snippets.

@sweetleon
Created January 17, 2018 01:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sweetleon/9adab6fbf8098a93cccd2f1766ca93ed to your computer and use it in GitHub Desktop.
Save sweetleon/9adab6fbf8098a93cccd2f1766ca93ed to your computer and use it in GitHub Desktop.
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])
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment