# frozen_string_literal: true designs = YAML.safe_load(File.read('db/seeds/designs.yml')) designs.each do |d| design = Design.find_or_create_by(gem: d['gem']) design.update_attributes d end licencias = YAML.safe_load(File.read('db/seeds/licencias.yml')) licencias.each do |l| licencia = Licencia.find_or_create_by(icons: l['icons']) licencia.update_attributes l end