Skip to content

Instantly share code, notes, and snippets.

@jquave
Created August 6, 2013 21:34
Show Gist options
  • Select an option

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

Select an option

Save jquave/6168913 to your computer and use it in GitHub Desktop.
class StatsController < ApplicationController
respond_to :json
protect_from_forgery :except => :create
def create
params[:stats].each do |stat|
puts stat
Stat.create(stat)
end
r = {:succes=>true}
respond_with r
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment