Skip to content

Instantly share code, notes, and snippets.

@jquave
Created August 6, 2013 19:14
Show Gist options
  • Select an option

  • Save jquave/6167630 to your computer and use it in GitHub Desktop.

Select an option

Save jquave/6167630 to your computer and use it in GitHub Desktop.
1 class StatsController < ApplicationController
2
3 protect_from_forgery :except => :create
4 def create
5
6 if Stat.create(params)
7 {:success=>1}.to_json
8 else
9 {:succes=>0}.to_json
10 end
11
12 end
13
14 end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment