Created
December 2, 2011 16:00
-
-
Save johanb/1423749 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # POST /game_entries.json | |
| def create | |
| @game_entry = GameEntry.new(JSON.parse(params["entry"])) | |
| respond_to do |format| | |
| if @game_entry.save | |
| format.json { render :json => { :status => true, :content => @game_entry } } | |
| else | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Started POST "/game_entries" for 127.0.0.1 at 2011-12-02 16:57:50 +0100 | |
| Processing by GameEntriesController#create as */* | |
| Parameters: {"entry"=>"{\"data\":\"data\",\"user_id\":\"5\",\"game_id\":0}", "Filename"=>"yodel.mp3", "data"=>[#<ActionDispatch::Http::UploadedFile:0x007fd8dc1e8770 @original_filename="yodel.mp3", @content_type="text/binary", @headers="Content-Disposition: form-data; name=\"data[]\"; filename=\"yodel.mp3\"\r\nContent-Type: text/binary\r\n", @tempfile=#<File:/var/folders/mc/0ky0qn9x7352978dj8xvm1nw0000gn/T/RackMultipart20111202-44004-vb244s>>], "Upload"=>"Submit Query"} | |
| WARNING: Can't verify CSRF token authenticity | |
| (0.1ms) SELECT 1 FROM "game_entries" WHERE ("game_entries"."user_id" = 5 AND "game_entries"."game_id" = 0) LIMIT 1 | |
| SQL (59.3ms) INSERT INTO "game_entries" ("created_at", "data_content_type", "data_file_name", "data_file_size", "data_updated_at", "game_id", "score", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Fri, 02 Dec 2011 15:57:50 UTC +00:00], ["data_content_type", nil], ["data_file_name", nil], ["data_file_size", nil], ["data_updated_at", nil], ["game_id", 0], ["score", nil], ["updated_at", Fri, 02 Dec 2011 15:57:50 UTC +00:00], ["user_id", 5]] | |
| [paperclip] Saving attachments. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment