From 36a959c92eade6eb476772ecf6325bf4cd540a4d Mon Sep 17 00:00:00 2001 From: Skud Date: Tue, 4 Jun 2013 20:35:50 +1000 Subject: [PATCH] Give Skud a staff account as part of oneoff shop setup --- lib/tasks/growstuff.rake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/tasks/growstuff.rake b/lib/tasks/growstuff.rake index 23d946622..1050c803d 100644 --- a/lib/tasks/growstuff.rake +++ b/lib/tasks/growstuff.rake @@ -58,7 +58,7 @@ namespace :growstuff do :is_paid => true, :is_permanent_paid => true ) - AccountType.find_or_create_by_name( + @staff_account = AccountType.find_or_create_by_name( :name => "Staff", :is_paid => true, :is_permanent_paid => true @@ -86,6 +86,13 @@ namespace :growstuff do end end + puts "Making Skud a staff account..." + @skud = Member.find_by_login_name('Skud') + if @skud + @skud.account.account_type = @staff_account + @skud.account.save + end + puts "Done setting up shop." end