From 617de1701ad10391f84d9bef680881b6bb3f3033 Mon Sep 17 00:00:00 2001 From: f Date: Fri, 6 Sep 2019 21:58:52 -0300 Subject: [PATCH] Sitios por defecto --- db/seeds.rb | 8 ++++++++ db/seeds/sites.yml | 8 ++++++++ 2 files changed, 16 insertions(+) create mode 100644 db/seeds/sites.yml diff --git a/db/seeds.rb b/db/seeds.rb index 2e91b9d1..c36c43bb 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -15,3 +15,11 @@ licencias.each do |l| licencia.update_attributes l end + +YAML.safe_load(File.read('db/seeds/sites.yml')).each do |site| + site = Site.find_or_create_by name: site['name'] + + site.update licencia: Licencia.first, design: Design.first, + title: site.name, description: 'x' * 50, + deploys: [DeployLocal.new] +end diff --git a/db/seeds/sites.yml b/db/seeds/sites.yml new file mode 100644 index 00000000..86f60376 --- /dev/null +++ b/db/seeds/sites.yml @@ -0,0 +1,8 @@ +--- +- name: api +- name: edit +- name: editor +- name: editar +- name: admin +- name: registry +- name: panel