Skip to content

Instantly share code, notes, and snippets.

@smsohan
Created July 28, 2012 19:02
Show Gist options
  • Save smsohan/3194430 to your computer and use it in GitHub Desktop.
Save smsohan/3194430 to your computer and use it in GitHub Desktop.
Example controller with server token
class ExampleController < ApiController
def index
data = Sale.realtime_data
#get the timestamp of this deployment
server_token = File.basename(Rails.root.to_s)
respond_with(data: data, server_token: server_token)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment