Add an option to automatically finish an order
This commit is contained in:
parent
c3927e4013
commit
564492afe4
10 changed files with 77 additions and 3 deletions
|
|
@ -1,6 +1,11 @@
|
|||
# put in here all foodsoft tasks
|
||||
# => :environment loads the environment an gives easy access to the application
|
||||
namespace :foodsoft do
|
||||
desc "Finish ended orders"
|
||||
task :finish_ended_orders => :environment do
|
||||
Order.finish_ended!
|
||||
end
|
||||
|
||||
desc "Notify users of upcoming tasks"
|
||||
task :notify_upcoming_tasks => :environment do
|
||||
tasks = Task.where(done: false, due_date: 1.day.from_now.to_date)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue