Skip to content

Instantly share code, notes, and snippets.

@claudiob
claudiob / enum_group_issue.rb
Created December 22, 2016 19:48
Rails 5.0.1 breaks the behaviour of .group(enum).count with PostgreSQL adapter
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"
# If you change the version to "5.0.0.1", the test will pass.
@claudiob
claudiob / missing_require.rb
Created October 19, 2016 18:47
Rails issue: missing require
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'
gem 'rails', github: 'rails/rails'
@claudiob
claudiob / test_tag_builder_options.rb
Created September 16, 2016 19:49
Bug: tag dynamic proxy does not accept options with keys as strings
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"
gem "rails", github: "rails/rails"
@claudiob
claudiob / has_many_foreign_key.rb
Created August 10, 2016 22:16
Failing test for has_many / dependent with foreign key
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"
gem "activerecord", "5.0.0"

Keybase proof

I hereby claim:

  • I am claudiob on github.
  • I am claudiob (https://keybase.io/claudiob) on keybase.
  • I have a public key whose fingerprint is 0AC7 5B91 373A 297F CF72 F6A7 06D5 DE4B FEB0 898A

To claim this, I am signing this object:

@claudiob
claudiob / test_polymorphic_validates_associated.rb
Created February 26, 2016 17:08
Regression in Rails 5.0.0.beta3
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'
gem 'rails', '5.0.0.beta3' # CHANGE TO '5.0.0.beta2' for tests to pass
@claudiob
claudiob / hwia-dig.rb
Created February 1, 2016 23:53
HashWithIndifferentAccess#dig in Rails 5.0.0.beta2
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'
@claudiob
claudiob / sti_with_index_broken_on_rails5.rb
Last active September 18, 2017 08:01
STI with index broken on Rails 5
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'
gem 'rails', github: 'rails/rails'
@claudiob
claudiob / failing_test_enum_sti.rb
Last active January 11, 2016 15:52
STI + enum fail in Rails 5.0.0.beta1
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'
gem 'rails', '>= 5.0.0.beta1', '< 5.1'
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'
gem 'rails', github: 'rails/rails'