mirror of https://github.com/rails/rails
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.
This commit is contained in:
parent
03018cb79b
commit
530f7805ed
|
@ -1,5 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "active_support/core_ext/object/try"
|
||||
|
||||
module ActionController
|
||||
module ConditionalGet
|
||||
extend ActiveSupport::Concern
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "active_support/core_ext/object/try"
|
||||
require "action_view/helpers/tags/placeholderable"
|
||||
|
||||
module ActionText
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "active_support/core_ext/object/try"
|
||||
|
||||
module ActionText
|
||||
class Attachment
|
||||
include Attachments::TrixConversion, Attachments::Minification, Attachments::Caching
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "active_support/core_ext/object/try"
|
||||
|
||||
module ActionText
|
||||
module Attachments
|
||||
module TrixConversion
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require "active_support/core_ext/object/try"
|
||||
|
||||
module ActiveModel
|
||||
module Type
|
||||
class Float < Value # :nodoc:
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# 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
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# 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] }
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
# 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_relative "dummy/config/environment.rb"
|
|||
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/time"
|
|||
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"
|
||||
|
||||
|
|
Loading…
Reference in New Issue