This gist will collects all issues we solved with Rails 5.2 and Webpacker
# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-test| db/schema.rb merge=railsschema |
This gist will collects all issues we solved with Rails 5.2 and Webpacker
# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new <project_name> --webpack=stimulus --database=postgresql --skip-coffee --skip-testinitialize: once, when the controller is first instantiatedconnect: anytime the controller is connected to the DOM| // Railslove JavaScript programming exercise A1 | |
| // | |
| // To run the following exercise you need to have mocha installed. | |
| // Install mocha with yarn global add mocha or npm install -g mocha | |
| // | |
| // Then watch the output of `mocha filter.js` and see 4 of 5 failing tests. | |
| // | |
| // The task is to filter a given collection (L#35) for entries that contain unique pairs. | |
| // While filtering return the same structure and keep the ranking. | |
| // Write code in the body of the filter method to make the tests pass. |
| begin | |
| require "bundler/inline" | |
| rescue LoadError => e | |
| $stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" | |
| raise e | |
| end | |
| gemfile(true) do | |
| source "https://rubygems.org" |
| begin | |
| require "bundler/inline" | |
| rescue LoadError => e | |
| $stderr.puts "Bundler version 1.10 or later is required. Please update your Bundler" | |
| raise e | |
| end | |
| gemfile(true) do | |
| source "https://rubygems.org" |
| # In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env | |
| # variable pointing GPG to the gpg-agent socket. This little script, which must be sourced | |
| # in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start | |
| # gpg-agent or set up the GPG_AGENT_INFO variable if it's already running. | |
| # Add the following to your shell init to set up gpg-agent automatically for every shell | |
| if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then | |
| source ~/.gnupg/.gpg-agent-info | |
| export GPG_AGENT_INFO | |
| else |
| TEXT = <<EOF | |
| See, the interesting thing about this text | |
| is that while it seems like the first line defines an indent | |
| it's actually the last line which has the smallest indent | |
| there are also some blank lines | |
| both with and without extra spaces in them | |
| and it just goes on and on |