Implementing Remote Modals In Rails
Implementing remote modals in Rails with custom responder
Sometimes you don’t want to write big JavaScript application just to have working remote modals in your rails application. The whole JSON-response parsing thing looks big and scary. Why can’t we simply render our views on a server and just display them as modals to users? Let’s take a look at how we can implement this with elegance. Note: I am using bootstrap 4 modals here but this solution can be adapted to any JS modals implementations. Check out working demo and source code. Step 0. Prepare your bundle Rails 4.2+ respond_with and the class-level respond_to methods have b...