Class: UuidV7::Types::Base::Data
- Inherits:
-
ActiveModel::Type::Binary::Data
- Object
- ActiveModel::Type::Binary::Data
- UuidV7::Types::Base::Data
- Defined in:
- lib/uuid_v7/types/base.rb
Overview
We need to override the hex method to avoid unpacking when quoting ActiveRecord calls hex method when quoting a value. github.com/rails/rails/blob/7-1-stable/activerecord/lib/active_record/connection_adapters/mysql/quoting.rb#L57
Instance Method Summary collapse
- #hex ⇒ Object
-
#initialize(value) ⇒ Data
constructor
A new instance of Data.
Constructor Details
#initialize(value) ⇒ Data
Returns a new instance of Data.
77 78 79 80 81 |
# File 'lib/uuid_v7/types/base.rb', line 77 def initialize(value) @value = value super end |
Instance Method Details
#hex ⇒ Object
83 84 85 |
# File 'lib/uuid_v7/types/base.rb', line 83 def hex @value end |