Use Sinatra config in whenever

This commit is contained in:
ricola 2026-03-01 13:18:32 -06:00
parent 495d29a0ae
commit 54d721abd4
4 changed files with 11 additions and 9 deletions

View file

@ -1,10 +1,4 @@
require 'sinatra'
# Set environment before requiring 'sinatra/activerecord' to make `whenever` uses the database.
if ENV['RAILS_ENV']
set :environment, ENV['RAILS_ENV']
end
require 'sinatra/activerecord'
require 'bcrypt'
require 'gettext'