inside show.js.erb
$('#viewport').html("<%= escape_javascript(render('show')) %>");
I am trying to render the show view into the bottom of the index view. Show is not a partial.
This doesn’t work. But I’m sure this page gets executed because I tried something like ‘hello world’, and it gets rendered.
other things i did are:
added a div #viewport inside index view
added remote: true in the links inside index view
added render js { :layout => false } inside the controller’s show action
Convert show view into a partial. Move the source inside show.html into a file named _view.html.erb:
Show.html.erb became: