I am using the following jQuery to render a partial when a button is clicked
$(document).ready(function() {
$(".service-type").click(function(e) {
e.preventDefault();
$('#details').html("<%= escape_javascript( render(:partial => 'my_partial',
:locals => { f: f })) %>");
});
});
but instead of it displaying the partial it inserts the following into my page
<%= escape_javascript( render(:partial => "my_partial", :locals => { f: f })) %>
Any ideas where I am going wrong?
render 'my_partial', f: f. You haven't needed the:partial/:localssince Rails 2.3.