Skip to content

Instantly share code, notes, and snippets.

@umdstu
Created January 13, 2013 00:50
Show Gist options
  • Save umdstu/4521427 to your computer and use it in GitHub Desktop.
Save umdstu/4521427 to your computer and use it in GitHub Desktop.
create.js.erb =>
alert("<%= @cart.id %>");
$('#cart').html("<%= render @cart %>");
_cart.html.erb =>
<%= Time.now %>
@umdstu
Copy link
Author

umdstu commented Jan 13, 2013

Started POST "/cart_products?product_id=1" for <> at Sat Jan 12 19:10:33 -0600 2013
Processing by CartProductsController#create as JS
Parameters: {"product_id"=>"1", "authenticity_token"=>"8W60IPjespoVxIojBXasRn7Gd3giSLRtwdfYPoY3/Kg="}
Rendered carts/_cart.html.erb (0.1ms)
Rendered cart_products/create.js.erb (0.5ms)
Completed 200 OK in 29ms (Views: 1.3ms | ActiveRecord: 1.4ms)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment