Created rake task to save rate

This commit is contained in:
Luiz F Picolo 2021-10-07 20:38:12 -04:00
parent 839cde3de7
commit c3e9d4b408
2 changed files with 10 additions and 1 deletions

View File

@ -1,3 +1,6 @@
require 'sinatra/activerecord'
require 'sinatra/activerecord/rake'
require './app'
require './models/rate'
require './app'
Dir.glob('lib/tasks/*.rake').each { |r| load r}

6
lib/tasks/cron.rake Normal file
View File

@ -0,0 +1,6 @@
namespace :rate do
desc "create and save rate"
task :save do
Rate.save
end
end