# This file should contain all the record creation needed to seed the database with its default values. # The data can then be loaded with the bin/rails db:seed command (or created alongside the database with db:setup). # # Examples: # # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) # Character.create(name: 'Luke', movie: movies.first) if Rails.env.development? annomarks = { "A" => "Affirmed", "C" => "Cited", "D" => "Distinguished", "F" => "Footnote", "I" => "Illustrative", "M" => "Modified", "O" => "Overruled", "CO" => "Concurring Opinion", "SO" => "Seperated Opinion" } annomarks.each { |k, v| Annomark.create(name: v, code: k) } if Annomark.count.zero? Doctrine.destroy_all doctrine = Doctrine.new doctrine.document = Cdao::Jurisprudence.first doctrine.content = "Dasdsadsadsa" doctrine.save doctrine.subject_ids = Cdao::Subject.first(3).map(&:id) doctrine = Doctrine.first annotation = doctrine.annotations.new annotation.document = Cdao::Jurisprudence.second annotation.annomark = Annomark.first annotation.save end