Module: Shrine::Plugins::Column::AttacherClassMethods
- Defined in:
- lib/shrine/plugins/column.rb
Instance Method Summary collapse
-
#from_column(data, **options) ⇒ Object
Initializes the attacher from a data hash/string expected to come from a database record column.
Instance Method Details
#from_column(data, **options) ⇒ Object
Initializes the attacher from a data hash/string expected to come from a database record column.
Attacher.from_column('{"id":"...","storage":"...","metadata":{...}}')
19 20 21 22 23 |
# File 'lib/shrine/plugins/column.rb', line 19 def from_column(data, **) attacher = new(**) attacher.load_column(data) attacher end |