Created
June 18, 2012 18:09
-
-
Save StlTenny/2949763 to your computer and use it in GitHub Desktop.
nested
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 "/customers/3/tabs" for 127.0.0.1 at Mon Jun 18 14:02:36 -0400 2012 | |
Processing by TabsController#create as HTML | |
Parameters: {"commit"=>"Create Tab", "authenticity_token"=>"2bJBuyENTUg/lOLjU7s1WdCESTAYEFM/CroNCWFWAWE=", "customer_id"=>"3", "tab"=>{"is_open"=>"1", "current_price"=>"0", "closed_price"=>"0", "bar_id"=>""}, "utf8"=>"✓"} | |
SQL (0.5ms) INSERT INTO "tabs" ("bar_id", "closed_price", "created_at", "current_price", "customer_id", "is_open", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?) [["bar_id", nil], ["closed_price", 0], ["created_at", Mon, 18 Jun 2012 18:02:36 UTC +00:00], ["current_price", 0], ["customer_id", nil], ["is_open", true], ["updated_at", Mon, 18 Jun 2012 18:02:36 UTC +00:00]] | |
Redirected to http://localhost:3000/tabs/4 | |
Completed 302 Found in 12ms | |
#Tab Controller | |
def new | |
@customer = Customer.find(params[:customer_id]) | |
@tab = @customer.tabs.build | |
respond_to do |format| | |
format.html # new.html.erb | |
format.json { render :json => @tab } | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment