instance method inherited

Ruby on Rails 5.1.7

Since v4.2.11.3 Last seen in v5.1.7 Private — implementation detail, not part of the public API

Available in: v4.2.11.3 v5.0.7.2 v5.1.7

Signature

inherited(subclass)

No documentation comment.

Parameters

subclass req
Source
# File activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb, line 70
          def inherited(subclass)
            super
            # We need to apply this decorator here, rather than on module inclusion. The closure
            # created by the matcher would otherwise evaluate for `ActiveRecord::Base`, not the
            # sub class being decorated. As such, changes to `time_zone_aware_attributes`, or
            # `skip_time_zone_conversion_for_attributes` would not be picked up.
            subclass.class_eval do
              matcher = ->(name, type) { create_time_zone_conversion_attribute?(name, type) }
              decorate_matching_attribute_types(matcher, :_time_zone_conversion) do |type|
                TimeZoneConverter.new(type)
              end
            end
          end

Defined in activerecord/lib/active_record/attribute_methods/time_zone_conversion.rb line 70 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveRecord::AttributeMethods::TimeZoneConversion::ClassMethods

Type at least 2 characters to search.

Use the arrow keys to navigate results, Enter to open one, Escape to close.

Keyboard shortcuts

/
Focus search
⌘K / Ctrl-K
Command palette
?
This help
Esc
Close