Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions db/seeds.rb
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,19 @@
org: Org.find_by(abbreviation: 'GA'),
is_default: false,
version: 0,
migrated:false,
migrated: false,
dmptemplate_id: 3}
]
templates.map{ |t| Template.create!(t) if Template.find_by(title: t[:title]).nil? }
# Template creation calls defaults handler which sets is_default and
# published to false automatically, so update them after creation
templates.map do |t|
if Template.find_by(title: t[:title]).nil?
tmplt = Template.create!(t)
tmplt.published = t[:published]
tmplt.is_default = t[:is_default]
tmplt.save!
end
end

# Create 2 phases for the funder's template and one for our generic template
# -------------------------------------------------------
Expand Down