Sha256: 4ea7d9da543f6e128a7b1b723574156fac50c734c6ca92d2d28a27e7354c391e
Contents?: true
Size: 374 Bytes
Versions: 52
Compression:
Stored size: 374 Bytes
Contents
def update_color colors = YAML.load(open('db/fixtures/enju_library/colors.yml').read) library_group = LibraryGroup.site_config colors.each do |line| l = line[1].select!{|k, v| %w(property code).include?(k)} color = Color.where(property: l["property"]).first unless color color = Color.create!(l) library_group.colors << color end end end
Version data entries
52 entries across 50 versions & 2 rubygems