Sha256: 5ed53d39f54a2d432c14b592a705b6f9ac6937f1bd456326e061427e2dd3eacd

Contents?: true

Size: 431 Bytes

Versions: 26

Compression:

Stored size: 431 Bytes

Contents

# desc "Explaining what the task does"
# task :auth do
#   # Task goes here
# end
# 
# 
desc "Create a default user as admin"
task :create_user, [:email, :password] => [:environment] do |t, args|
  puts "Creating new user with #{:email} and password *** !"
  u = User.create({email: args.email, password: args.password, password_confirmation: args.password})
  if u.save!
    puts "User created!"
  else
    puts "Error"
  end
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
mix-rails-0.26.3 mix-rails-auth/lib/tasks/auth_tasks.rake
mix-rails-auth-0.26.3 lib/tasks/auth_tasks.rake
mix-rails-0.26.2 mix-rails-auth/lib/tasks/auth_tasks.rake
mix-rails-auth-0.26.2 lib/tasks/auth_tasks.rake
mix-rails-0.26.1 mix-rails-auth/lib/tasks/auth_tasks.rake
mix-rails-auth-0.26.1 lib/tasks/auth_tasks.rake
mix-rails-0.26.0 mix-rails-auth/lib/tasks/auth_tasks.rake
mix-rails-auth-0.26.0 lib/tasks/auth_tasks.rake
mix-rails-0.25.1 mix-rails-auth/lib/tasks/auth_tasks.rake
mix-rails-auth-0.25.1 lib/tasks/auth_tasks.rake
mix-rails-0.25.0 mix-rails-auth/lib/tasks/auth_tasks.rake
mix-rails-auth-0.25.0 lib/tasks/auth_tasks.rake
mix-rails-0.24.1 mix-rails-auth/lib/tasks/auth_tasks.rake
mix-rails-auth-0.24.1 lib/tasks/auth_tasks.rake
mix-rails-0.24.0 mix-rails-auth/lib/tasks/auth_tasks.rake
mix-rails-auth-0.24.0 lib/tasks/auth_tasks.rake
mix-rails-0.23.1 mix-rails-auth/lib/tasks/auth_tasks.rake
mix-rails-auth-0.23.1 lib/tasks/auth_tasks.rake
mix-rails-0.23.0 mix-rails-auth/lib/tasks/auth_tasks.rake
mix-rails-auth-0.23.0 lib/tasks/auth_tasks.rake