This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
require "bundler/inline" | |
gemfile(true) do | |
source "https://rubygems.org" | |
git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
gem "rails", github: "rails/rails" | |
gem 'pg' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
de: | |
customer: Kunde | |
welcome: Willkommen, %{user} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# frozen_string_literal: true | |
module OrderByTranslated | |
extend ActiveSupport::Concern | |
module ClassMethods | |
def order_translated(*attributes) | |
order(order_translated_sql(nil, *attributes)) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Activate the gem you are reporting the issue against. | |
gem 'activerecord', '4.2.1' | |
require 'active_record' | |
require 'minitest/autorun' | |
require 'logger' | |
# Ensure backward compatibility with Minitest 4 | |
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test) | |
# This connection will do for database-independent bug reports. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Premailer::Rails::CSSLoaders::AssetPipelineLoader.class_eval do | |
def self.file_name(url) | |
URI(url).path | |
.sub("#{::Rails.configuration.assets.prefix}/", '') | |
.sub(/-\h{32,}\.css$/, '.css') | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'yaml' | |
gem 'activerecord', '4.2.0' | |
require 'active_record' | |
require 'minitest/autorun' | |
require 'logger' | |
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test) | |
ActiveRecord::Base.establish_connection(adapter: 'postgresql', database: '...', username: '...', password: '...') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'delocalize' | |
# This just reverts a delocalize patch to the Rails default. | |
# Necessary to prevent runtime errors due to changed method signatures. | |
ActiveRecord::Base.class_eval do | |
define_method :_field_changed? do |attr, old_value| | |
@attributes[attr].changed_from?(old_value) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gem 'activerecord', '4.2.0' # No error with 4.1.8 | |
require 'active_record' | |
require 'minitest/autorun' | |
require 'logger' | |
Minitest::Test = MiniTest::Unit::TestCase unless defined?(Minitest::Test) | |
ActiveRecord::Base.establish_connection(adapter: 'sqlite3', database: ':memory:') | |
ActiveRecord::Base.logger = Logger.new(STDOUT) | |
ActiveRecord::Schema.define do |