Code
desc "Says to you a Hello World"
task :hello_world do
puts "Hello world"
end
Console call
rake hello_world
Code
desc "Create a default user as admin"
task :create_user, [:email, :password] do |t, args|
args.email # => email argument
args.password # => password argument
end
Console call
rake create_user[[email protected],mypassword]
task :environment do
puts "loading environment!"
end
...
desc "This task loads another task"
task :create_user => :environment do
puts "This task will execute task environment before"
end