Class: Bukovina::Importers::IconLink
- Defined in:
- lib/bukovina/importers/icon_link.rb
Instance Method Summary collapse
Instance Method Details
#import ⇒ Object
5 6 7 8 9 10 11 12 |
# File 'lib/bukovina/importers/icon_link.rb', line 5 def import @attrs.each do |attrs| memory_attrs = attrs.delete( :memory ) attrs[ :info ] = Memory.where( memory_attrs ).first create_attrs = attrs.delete( :description ) IconLink.where( attrs ).first_or_create( attrs.merge( { descriptions_attributes: [ create_attrs || {} ] } ) ) ;end ;end |