Skip to content

Instantly share code, notes, and snippets.

@dylanz
Created January 28, 2010 18:32
Show Gist options
  • Save dylanz/289000 to your computer and use it in GitHub Desktop.
Save dylanz/289000 to your computer and use it in GitHub Desktop.
@something = Rails.cache.fetch("some_key") { Something.find("data") }
render :json => @something.to_json, :callback => params[:callback]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment