Rails UJS outside the asset pipeline/with modulesJuly 18, 2017
With Rails 5.1 the team replaced the great
jquery-ujs library with
However, if you try and load it up outside the Rails asset pipeline it's not as simple as
//= require rails-ujs. When you use the module version of it you'll need to first import it, then start it. So, run
yarn install rails-ujs to add the dependency and then boot it up in your app.
import Rails from 'rails-ujs'; Rails.start();
A blog about Laravel & Rails, written by Dwight Watson.