module Shrine::Plugins::Column::AttacherClassMethods

  1. lib/shrine/plugins/column.rb

Methods

Public Instance

  1. from_column

Public Instance methods

from_column(data, **options)

Initializes the attacher from a data hash/string expected to come from a database record column.

Attacher.from_column('{"id":"...","storage":"...","metadata":{...}}')
[show source]
   # File lib/shrine/plugins/column.rb
19 def from_column(data, **options)
20   attacher = new(**options)
21   attacher.load_column(data)
22   attacher
23 end