Sha256: 33426ae00ec03204296e625eb4cf2477c7c78a806c08950e2d6a3ebd30a50681
Contents?: true
Size: 386 Bytes
Versions: 13
Compression:
Stored size: 386 Bytes
Contents
class SingleAssetModelForm include ActiveModel::Model include Tessa::Model ATTRIBUTES = %w[ title avatar ] attr_accessor :single_asset_model attr_accessor *ATTRIBUTES def self.from_single_asset_model(model, attrs = {}) new( model.attributes .slice(*ATTRIBUTES) .merge(attrs) .merge(single_asset_model: model) ) end end
Version data entries
13 entries across 13 versions & 1 rubygems