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
package com.example.failsafe; | |
import dev.failsafe.*; | |
import dev.failsafe.function.*; | |
import java.util.*; | |
import static java.util.stream.Collectors.toList; | |
import org.junit.*; | |
import static org.junit.Assert.*; |
import groovy.yaml.YamlSlurper | |
def slurper = new YamlSlurper() | |
def configuration = ''' | |
version: 3.0 | |
environment: "dev" | |
context: | |
path: "/test" | |
endpoints: |
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
~/dev/real-world-rails (master) | |
$ ag -G 'config/initializers/' ::DATE_FORMATS | |
apps/accelerated_claims/config/initializers/date_formats.rb | |
1:Date::DATE_FORMATS[:printed] = '%d %B %Y' | |
apps/advocate-defence-payments/config/initializers/date_time.rb | |
2:Date::DATE_FORMATS[:default] = Settings.date_format | |
5:DateTime::DATE_FORMATS[:default] = Settings.date_time_format | |
8:Time::DATE_FORMATS[:default] = Settings.date_time_format |
require 'json' | |
require 'open-uri' | |
require 'benchmark/ips' | |
require 'memory_profiler' | |
json = open('https://network.pivotal.io/api/v2/products').read | |
Benchmark.ips do |x| | |
x.report('symbolize_names: false') { JSON.parse(json) } | |
x.report('symbolize_names: true') { JSON.parse(json, symbolize_names: true) } |
require 'rails_event_store' | |
require 'aggregate_root' | |
PaymentAuthorized = Class.new(RailsEventStore::Event) | |
PaymentSuccessed = Class.new(RailsEventStore::Event) | |
PaymentFailed = Class.new(RailsEventStore::Event) | |
PaymentCaptured = Class.new(RailsEventStore::Event) | |
class Payment | |
InvalidOperation = Class.new(StandardError) |
<?php | |
namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
use App\Todo; | |
class TodosController extends Controller | |
{ |
gem 'browserify-rails', '1.5.0' # until fix: https://github.com/browserify-rails/browserify-rails/issues/101
gem 'react-rails'
Browserify-rails allows to use browserify within assets pipeline. React-rails is here only to allow to use #react_component
(and thus, prerendering).
Note that jquery-rails
can be removed from Gemfile, the npm version of jquery
and jquery-ujs
will be used instead.
Adding Hidden Agendas | |
Adjusting Bell Curves | |
Aesthesizing Industrial Areas | |
Aligning Covariance Matrices | |
Applying Feng Shui Shaders | |
Applying Theatre Soda Layer | |
Asserting Packed Exemplars | |
Attempting to Lock Back-Buffer | |
Binding Sapling Root System | |
Breeding Fauna |
#!/usr/bin/env ruby | |
# Some members of ruby community continue to misunderstand the interplay of | |
# signal handlers and exception handling. This is a brief exploration | |
# via examples. You can run them by uncommenting the invocations at | |
# the bottom. You can see their behavior with Ctrl-C. | |
# | |
# Some of the examples will require a kill -9 from another terminal to | |
# stop. | |
# |