This commit is contained in:
2026-06-12 15:40:12 -04:00
commit 521653e5de
53 changed files with 8635 additions and 0 deletions
+15
View File
@@ -0,0 +1,15 @@
development:
adapter: mysql2
encoding: utf8mb4
database: dashboard_development
username: root
password: mypassword
host: db
port: 3306
production:
adapter: mysql2
encoding: utf8
username: root
password:
database: sinatra_template_production
+13
View File
@@ -0,0 +1,13 @@
require 'bundler/setup'
Bundler.require(:default, ENV['RACK_ENV'] || :development)
# Establish ActiveRecord Connection
ActiveRecord::Base.configurations = YAML.load_file('config/database.yml')
ActiveRecord::Base.establish_connection(ENV['RACK_ENV']&.to_sym || :development)
# Load Models
Dir.glob(File.join(File.dirname(__FILE__), '../app/models', '*.rb')).each { |file| require file }
require_relative '../app/controllers/application_controller'
# Enable ActiveRecord logging to stdout
ActiveRecord::Base.logger = Logger.new(STDOUT)