News for hackers. Stuff that matters.
Re:Modern Front-end in Rails by pqdbr on Friday December 08, 2017 @01:22PM (#15880678)
Totally agree. You can go the .js.erb views and `$('#div_id').replaceWith('<%= escape_javascript(render partial :partial_name) %>')` route, or you can use render_to_string and put your partial HTML in JSON and replace it with frontend JS, and so on and so on. And there's also turbolinks to consider and the idempotent stuff.

It's all great, I got my way around it, but I never know if what I'm doing is considered best practice or not.

There are no comments on this comment yet.