From 74193ab3cf1728cd4c45e515ca0180b7991cedf1 Mon Sep 17 00:00:00 2001 From: Markus Graf Date: Fri, 31 Mar 2017 16:59:10 +0200 Subject: [PATCH] Added script to update users default passwords --- lib/setpasswords.rb | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 lib/setpasswords.rb diff --git a/lib/setpasswords.rb b/lib/setpasswords.rb new file mode 100644 index 0000000..455c161 --- /dev/null +++ b/lib/setpasswords.rb @@ -0,0 +1,4 @@ +helper = ApplicationController.helpers + +never_signed_in = Supporter.where(:sign_in_count.lt => 1) +never_signed_in.each_with_index {|u,i|puts "#{i} #{u.email}"; u.update_attributes password: "#{u.support}#{ helper.number_with_delimiter(u.zip, :delimiter => ',')}"} \ No newline at end of file