I have recently started using version 6 of rails and have questions about application.js
I asked you two questions.
(1) Location of application.js
Has the location of the application.js file changed in rails 5 and 6?
(2) How to write require in application.js file
Has the format of require changed between rails 5 and 6?
// = require rails-ujs // = require turbolinks // = require_tree.
require ("@ rails/ujs"). start () require ("turbolinks"). start () require ("@ rails/activestorage"). start () require ("channels")
Answer # 1
Both (1) and (2) have changed. It is the influence that Webpacker became the default in Rails6. Search with Rails6, Webpacker for more details.
- ruby on rails - about the description in applicationjs
- ruby on rails - about nomethoderror in skilscontroller # create
- ruby - about rails controller new action
- ruby on rails - about request spec of rspec about test code at login
- ruby on rails - about the error when trying to implement jquery with rails ($is not defined;please fix or add/* global * /)