cirandas.net

ref: master

db/migrate/052_create_templates.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
class CreateTemplates < ActiveRecord::Migration
  def self.up
    Environment.find_each do |env|
      if env.person_template.nil? && env.community_template.nil? && env.enterprise_template.nil?
        env.create_templates
      end
    end
  end

  def self.down
    # nothing
  end
end