summaryrefslogtreecommitdiff
path: root/lib/authors_importer.rb
diff options
context:
space:
mode:
authorhukl <contact@smyck.org>2009-04-18 19:52:42 +0200
committerhukl <contact@smyck.org>2009-04-18 19:52:42 +0200
commit6b936cf82f5357f97aaa909ee4f137b944080ffc (patch)
treed2a0a6946e87737b0898695bc5a7671f4f301c90 /lib/authors_importer.rb
parent1970df667946a8b55ad0ad5bc140b3d9e5515d20 (diff)
added update_authors_on_pages task. run after importing authors
Diffstat (limited to 'lib/authors_importer.rb')
-rw-r--r--lib/authors_importer.rb16
1 files changed, 1 insertions, 15 deletions
diff --git a/lib/authors_importer.rb b/lib/authors_importer.rb
index 6195111..08b3be9 100644
--- a/lib/authors_importer.rb
+++ b/lib/authors_importer.rb
@@ -8,7 +8,7 @@ class AuthorsImporter
8 end 8 end
9 9
10 def import_authors 10 def import_authors
11 parse_csv || find_or_create_user 11 parse_csv
12 end 12 end
13 13
14 def parse_csv 14 def parse_csv
@@ -26,24 +26,10 @@ class AuthorsImporter
26 26
27 find_or_create_user options 27 find_or_create_user options
28 end 28 end
29
30 return true
31 end 29 end
32 end 30 end
33 31
34 def find_or_create_user options = {} 32 def find_or_create_user options = {}
35 password = generate_password
36
37 # default_options = {
38 # :login => "webmaster",
39 # :full_name => "Webmaster",
40 # :email => "webmaster@ccc.de",
41 # :password => password,
42 # :password_confirmation => password
43 # }
44 # default_options = {}
45 #
46 # options = default_options.merge(options)
47 puts options[:login] 33 puts options[:login]
48 34
49 unless User.find_by_email(options[:email]) 35 unless User.find_by_email(options[:email])