$ echo 'gem "webpacker"' >> Gemfile
$ bundle install
$ rails webpacker:install
$ yarn add [email protected] jquery popper.jsdiff --git a/config/webpack/environment.js b/config/webpack/environment.js
index d16d9af..86bf1a7 100644| HTTP status code symbols for Rails | |
| Thanks to Cody Fauser for this list of HTTP responce codes and their Ruby on Rails symbol mappings. | |
| Status Code Symbol | |
| 1xx Informational | |
| 100 :continue | |
| 101 :switching_protocols | |
| 102 :processing |
$ echo 'gem "webpacker"' >> Gemfile
$ bundle install
$ rails webpacker:install
$ yarn add [email protected] jquery popper.jsdiff --git a/config/webpack/environment.js b/config/webpack/environment.js
index d16d9af..86bf1a7 100644| const waitFor = (ms) => new Promise(r => setTimeout(r, ms)) | |
| const asyncForEach = async (array, callback) => { | |
| for (let index = 0; index < array.length; index++) { | |
| await callback(array[index], index, array) | |
| } | |
| } | |
| const start = async () => { | |
| await asyncForEach([1, 2, 3], async (num) => { | |
| await waitFor(50) |
initialize: once, when the controller is first instantiatedconnect: anytime the controller is connected to the DOM| require 'benchmark' | |
| require 'etc' | |
| Ractor.new { :warmup } if defined?(Ractor) | |
| def fibonacci(n) | |
| return n if (0..1).include? n | |
| fibonacci(n - 1) + fibonacci(n - 2) | |
| end |