1
0
Fork 0
mirror of https://github.com/paper-trail-gem/paper_trail.git synced 2022-11-09 11:33:19 -05:00
paper-trail-gem--paper_trail/spec/dummy_app/config/application.rb

45 lines
1.6 KiB
Ruby
Raw Normal View History

2017-12-10 23:05:11 -05:00
# frozen_string_literal: true
2018-03-27 18:32:52 -04:00
require File.expand_path("boot", __dir__)
2011-02-08 12:16:35 -05:00
# Here a conventional app would load the Rails components it needs, but we have
# already loaded these in our spec_helper.
# require "active_record/railtie"
# require "action_controller/railtie"
2011-02-08 12:16:35 -05:00
# Here a conventional app would require gems, but again, we have already loaded
# these in our spec_helper.
# Bundler.require(:default, Rails.env)
2011-02-08 12:16:35 -05:00
module Dummy
class Application < Rails::Application
YAML_COLUMN_PERMITTED_CLASSES = [
::ActiveRecord::Type::Time::Value,
::ActiveSupport::TimeWithZone,
::ActiveSupport::TimeZone,
::BigDecimal,
::Date,
::Symbol,
::Time
].freeze
config.load_defaults(::ActiveRecord.gem_version.segments.take(2).join("."))
2011-02-08 12:16:35 -05:00
config.encoding = "utf-8"
config.filter_parameters += [:password]
config.active_support.escape_html_entities_in_json = true
2017-03-31 22:33:12 -04:00
config.active_support.test_order = :sorted
config.secret_key_base = "A fox regularly kicked the screaming pile of biscuits."
# `use_yaml_unsafe_load` was added in 5.2.8.1, 6.0.5.1, 6.1.6.1, and 7.0.3.1.
# Will be removed in 7.1.0?
if ::ActiveRecord.respond_to?(:use_yaml_unsafe_load) # 7.0.3.1
::ActiveRecord.use_yaml_unsafe_load = false
::ActiveRecord.yaml_column_permitted_classes = YAML_COLUMN_PERMITTED_CLASSES
elsif ::ActiveRecord::Base.respond_to?(:use_yaml_unsafe_load) # 5.2.8.1, 6.0.5.1, 6.1.6.1
::ActiveRecord::Base.use_yaml_unsafe_load = false
::ActiveRecord::Base.yaml_column_permitted_classes = YAML_COLUMN_PERMITTED_CLASSES
end
2011-02-08 12:16:35 -05:00
end
end