admin → superadmin

This commit is contained in:
gregoirenovel 2018-12-21 15:19:24 +01:00 committed by Pierre de La Morinerie
parent 324b65b7ad
commit 0e6db7106c

View file

@ -1,4 +1,4 @@
namespace :admin do
namespace :superadmin do
desc <<~EOD
List all super-admins
EOD
@ -12,7 +12,7 @@ namespace :admin do
desc <<~EOD
Create a new super-admin account with the #EMAIL email address.
EOD
task :create_admin, [:email] => :environment do |_t, args|
task :create, [:email] => :environment do |_t, args|
email = args[:email]
puts "Creating Administration for #{email}"
@ -28,7 +28,7 @@ namespace :admin do
desc <<~EOD
Delete the #EMAIL super-admin account
EOD
task :delete_admin, [:email] => :environment do |_t, args|
task :delete, [:email] => :environment do |_t, args|
email = args[:email]
puts "Deleting Administration for #{email}"
a = Administration.find_by(email: email)