Working through “Agile Web Development with Rails” edition 4 and hit the section on beginning AJAX. (Chapter 11 iteration F2). In the example code, the book using Rails 3.0 recommends creating:
app/views/line_items/create.js.rjs with the file only containing:
page.replace_html('cart', render(@cart))
What would an equivalent implementation for rails 3.1 using jQuery be?
app/views/line_items/create.js.erb?
$('#cart').html(?something magical here?)
You’d better do: