Sha256: be9c71babbd7178f0ca25f7329dfe99488f8aa67ad70ac5e249b5cff2dc5b4ae

Contents?: true

Size: 553 Bytes

Versions: 15

Compression:

Stored size: 553 Bytes

Contents

# frozen_string_literal: true

module Gutentag::ActiveRecord::ClassMethods
  def tagged_with(options)
    Gutentag::TaggedWith.call self, options
  end

  if ActiveRecord::VERSION::STRING.to_f < 4.2
    def skip_time_zone_conversion_for_attributes
      super + [:tag_names]
    end
  end

  if ActiveRecord::VERSION::STRING.to_f < 4.0
    def create_time_zone_conversion_attribute?(attr_name, column)
      attr_name != "tag_names" && super
    end

    def attribute_cast_code(attr_name)
      attr_name == "tag_names" ? "v" : super
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
gutentag-2.6.2 lib/gutentag/active_record/class_methods.rb
gutentag-2.6.1 lib/gutentag/active_record/class_methods.rb
gutentag-2.6.0 lib/gutentag/active_record/class_methods.rb
gutentag-2.5.4 lib/gutentag/active_record/class_methods.rb
gutentag-2.5.3 lib/gutentag/active_record/class_methods.rb
gutentag-2.5.2 lib/gutentag/active_record/class_methods.rb
gutentag-2.5.1 lib/gutentag/active_record/class_methods.rb
gutentag-2.5.0 lib/gutentag/active_record/class_methods.rb
gutentag-2.4.1 lib/gutentag/active_record/class_methods.rb
gutentag-2.4.0 lib/gutentag/active_record/class_methods.rb
gutentag-2.3.2 lib/gutentag/active_record/class_methods.rb
gutentag-2.3.1 lib/gutentag/active_record/class_methods.rb
gutentag-2.3.0 lib/gutentag/active_record/class_methods.rb
gutentag-2.2.1 lib/gutentag/active_record/class_methods.rb
gutentag-2.2.0 lib/gutentag/active_record/class_methods.rb