Sha256: d61c7dc1e3dd56ff5d4cb37a2fd79303a773589d67bc68eb6d1662b84485e562
Contents?: true
Size: 414 Bytes
Versions: 31
Compression:
Stored size: 414 Bytes
Contents
def update_identifier_type identifier_types = YAML.load(open('db/fixtures/enju_biblio/identifier_types.yml').read) identifier_types.each do |line| l = line[1].select!{|k, v| %w(name display_name note).include?(k)} identifier_type = IdentifierType.where(name: l["name"]).first if identifier_type identifier_type.update_attributes!(l) else IdentifierType.create!(l) end end end
Version data entries
31 entries across 30 versions & 2 rubygems