提交 530f7805 编写于 作者: A Akira Matsuda

It may be better to explicitly require 'object/try' where we call `try`

In most cases it works now without explicit require because it's accidentally required through
active_support/core_ext/date_and_time/calculations.rb where we still call `try`,
but that would stop working if we changed the Calculations implementation and remove the require call there.
上级 03018cb7
# frozen_string_literal: true
require "active_support/core_ext/object/try"
module ActionController
module ConditionalGet
extend ActiveSupport::Concern
......
# frozen_string_literal: true
require "active_support/core_ext/object/try"
require "action_view/helpers/tags/placeholderable"
module ActionText
......
# frozen_string_literal: true
require "active_support/core_ext/object/try"
module ActionText
class Attachment
include Attachments::TrixConversion, Attachments::Minification, Attachments::Caching
......
# frozen_string_literal: true
require "active_support/core_ext/object/try"
module ActionText
module Attachments
module TrixConversion
......
# frozen_string_literal: true
require "active_support/core_ext/object/try"
module ActiveModel
module Type
class Float < Value # :nodoc:
......
# frozen_string_literal: true
require "active_support/core_ext/object/try"
module ActiveRecord
module AttributeMethods
module TimeZoneConversion
......
......@@ -12,6 +12,7 @@ class ::PG::Connection # :nodoc:
end
end
require "active_support/core_ext/object/try"
require "active_record/connection_adapters/abstract_adapter"
require "active_record/connection_adapters/statement_pool"
require "active_record/connection_adapters/postgresql/column"
......
......@@ -2,6 +2,7 @@
require "active_record"
require "rails"
require "active_support/core_ext/object/try"
require "active_model/railtie"
# For now, action_controller must always be present with
......
# frozen_string_literal: true
require "active_support/core_ext/object/try"
# Provides asynchronous mirroring of directly-uploaded blobs.
class ActiveStorage::MirrorJob < ActiveStorage::BaseJob
queue_as { ActiveStorage.queues[:mirror] }
......
# frozen_string_literal: true
require "active_support/core_ext/object/try"
module ActiveStorage
# Provides the class-level DSL for declaring an Active Record model's attachments.
module Attached::Model
......
......@@ -6,6 +6,7 @@
require "bundler/setup"
require "active_support"
require "active_support/test_case"
require "active_support/core_ext/object/try"
require "active_support/testing/autorun"
require "active_storage/service/mirror_service"
require "image_processing/mini_magick"
......
......@@ -5,6 +5,7 @@
require "active_support/core_ext/object/blank"
require "active_support/core_ext/object/to_param"
require "active_support/core_ext/object/to_query"
require "active_support/core_ext/object/try"
require "active_support/core_ext/array/wrap"
require "active_support/core_ext/hash/reverse_merge"
require "active_support/core_ext/string/inflections"
......
......@@ -3,6 +3,7 @@
require "mutex_m"
require "concurrent/map"
require "set"
require "active_support/core_ext/object/try"
module ActiveSupport
module Notifications
......
......@@ -3,6 +3,7 @@
require "rails/railtie"
require "rails/engine/railties"
require "active_support/core_ext/module/delegation"
require "active_support/core_ext/object/try"
require "pathname"
require "thread"
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册