Module: Shrine::Plugins::Persistence::AttacherMethods

Defined in:
lib/shrine/plugins/_persistence.rb

Instance Method Summary collapse

Instance Method Details

#atomic_persistObject

Raises:

  • (NotImplementedError)

67
68
69
# File 'lib/shrine/plugins/_persistence.rb', line 67

def atomic_persist(*)
  raise NotImplementedError, "unhandled by a persistence plugin"
end

#atomic_promoteObject

Raises:

  • (NotImplementedError)

63
64
65
# File 'lib/shrine/plugins/_persistence.rb', line 63

def atomic_promote(*)
  raise NotImplementedError, "unhandled by a persistence plugin"
end

#persistObject

Raises:

  • (NotImplementedError)

71
72
73
# File 'lib/shrine/plugins/_persistence.rb', line 71

def persist(*)
  raise NotImplementedError, "unhandled by a persistence plugin"
end

#set_entityObject

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


77
78
79
80
# File 'lib/shrine/plugins/_persistence.rb', line 77

def set_entity(*)
  super
  @column_serializer = nil if hash_attribute?
end