module Shrine::Plugins::Persistence::AttacherMethods

Public Instance Methods

atomic_persist(*) click to toggle source
# File lib/shrine/plugins/_persistence.rb, line 67
def atomic_persist(*)
  raise NotImplementedError, "unhandled by a persistence plugin"
end
atomic_promote(*) click to toggle source
# File lib/shrine/plugins/_persistence.rb, line 63
def atomic_promote(*)
  raise NotImplementedError, "unhandled by a persistence plugin"
end
persist(*) click to toggle source
# File lib/shrine/plugins/_persistence.rb, line 71
def persist(*)
  raise NotImplementedError, "unhandled by a persistence plugin"
end
set_entity(*) click to toggle source

Disable attachment data serialization for data attributes that accept and return hashes.

Calls superclass method
# File lib/shrine/plugins/_persistence.rb, line 77
def set_entity(*)
  super
  @column_serializer = nil if hash_attribute?
end

Private Instance Methods

hash_attribute?() click to toggle source

Whether the data attribute accepts and returns hashes.

# File lib/shrine/plugins/_persistence.rb, line 85
def hash_attribute?
  false
end