lib/tasks/user.rake in daily-0.0.3 vs lib/tasks/user.rake in daily-0.0.4

- old
+ new

@@ -1,16 +1,16 @@ namespace :user do desc "Create a user given email and password" task :create, [:email, :password] => :environment do |t, args| - user = User.new(:email => args[:email], :password => args[:password]) + user = DailyUser.new(:email => args[:email], :password => args[:password]) if user.save puts "User #{user.email} created!" else puts "Error: #{user.errors.full_messages.join(", ")}" end end task :admin, [:email, :password] => [:environment, :create] do |t, args| - user = User.find_by_email(args[:email]) + user = DailyUser.find_by_email(args[:email]) if user user.admin = true if user.save puts "User made admin." else \ No newline at end of file