From f1caf4cdeb3553b6430847baacc0f749215a423a Mon Sep 17 00:00:00 2001 From: Shanil Puri Date: Tue, 23 Sep 2014 17:04:22 -0400 Subject: [PATCH] Updated setup rake to use correct roles and permissions. --- lib/tasks/setup.rake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/tasks/setup.rake b/lib/tasks/setup.rake index ef59ab6..0744f1a 100644 --- a/lib/tasks/setup.rake +++ b/lib/tasks/setup.rake @@ -1,17 +1,18 @@ desc "setup the application for use" task :setup_sample_application => [:environment] do puts "Application is being prepared. Please wait." - perm_list = ['application_admin', 'can_publish'] + perm_list = ['application_admin', 'can_publish', 'can_apply'] perm_list.each do |p| Permission.find_or_create_by(:name => p) end - role_list = ["Admin", "Editor", "Reporter"] + role_list = ["Admin", "Employer", "Jobseeker"] role_list.each do |r| Role.find_or_create_by(:name => (r)) end Role.find_by(:name => "Admin").permissions << Permission.all Role.find_by(:name => "Editor").permissions << Permission.find_by(:name => "can_publish") + Role.find_by(:name => "Jobseeker").permissions << Permission.find_by(:name => "can_apply") # Create Dummy Admin User user = User.create!(:name => "Shanil Puri", :email => "shanil.puri@gmail.com", :phone => 9199860912, :password => "1234567x", :password_confirmation => "1234567x")