Sha256: 3e25a667ea437d1d7ae4eb3a42ef81818d4fe69f212b32cf7fa424c61113b40a
Contents?: true
Size: 406 Bytes
Versions: 13
Compression:
Stored size: 406 Bytes
Contents
class SingleAssetModelForm include ActiveModel::Model include Tessa::Model ATTRIBUTES = %w[ title avatar_id ] attr_accessor :single_asset_model attr_accessor *ATTRIBUTES asset :avatar 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