Commit 57a7832e1c532fa76c8bca7c573700866c910c15
1 parent
dd6a2ef1
Exists in
master
and in
5 other branches
Create task to populate software categories
Signed-off-by: Arthur Del Esposte <arthurmde@gmail.com> Signed-off-by: Parley Martins <parley@outlook.com>
Showing
1 changed file
with
24 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,24 @@ |
1 | +namespace :software do | |
2 | + desc "Create software categories" | |
3 | + task :create_categories => :environment do | |
4 | + Environment.all.each do |env| | |
5 | + if env.plugin_enabled?("MpogSoftware") | |
6 | + software = Category.create!(:name => _("Software"), :environment => env) | |
7 | + Category.create!(:name => _("Agriculture, Fisheries and Extraction"), :environment => env, :parent => software) | |
8 | + Category.create!(:name => _("Science, Information and Communication"), :environment => env, :parent => software) | |
9 | + Category.create!(:name => _("Economy and Finances"), :environment => env, :parent => software) | |
10 | + Category.create!(:name => _("Public Administration"), :environment => env, :parent => software) | |
11 | + Category.create!(:name => _("Habitation, Sanitation and Urbanism"), :environment => env, :parent => software) | |
12 | + Category.create!(:name => _("Individual, Family and Society"), :environment => env, :parent => software) | |
13 | + Category.create!(:name => _("Health"), :environment => env, :parent => software) | |
14 | + Category.create!(:name => _("Social Welfare and Development"), :environment => env, :parent => software) | |
15 | + Category.create!(:name => _("Defense and Security"), :environment => env, :parent => software) | |
16 | + Category.create!(:name => _("Education"), :environment => env, :parent => software) | |
17 | + Category.create!(:name => _("Government and Politics"), :environment => env, :parent => software) | |
18 | + Category.create!(:name => _("Justice and Legislation"), :environment => env, :parent => software) | |
19 | + Category.create!(:name => _("International Relationships"), :environment => env, :parent => software) | |
20 | + Category.create!(:name => _("Transportation and Traffic"), :environment => env, :parent => software) | |
21 | + end | |
22 | + end | |
23 | + end | |
24 | +end | |
0 | 25 | \ No newline at end of file | ... | ... |