# HG changeset patch # User Nattee Niparnan # Date 2022-09-27 14:17:34 # Node ID 6a10ef0d24b7647126fad36dd0a3fc0c89fe1f6b # Parent 93c4562b976121f8907e553efba1db61c9e1f168 default config diff --git a/config/application.rb.SAMPLE b/config/application.rb.SAMPLE --- a/config/application.rb.SAMPLE +++ b/config/application.rb.SAMPLE @@ -1,13 +1,10 @@ -require File.expand_path('../boot', __FILE__) +require_relative "boot" -require 'rails/all' +require "rails/all" -if defined?(Bundler) - # If you precompile assets before deploying to production, use this line - Bundler.require(*Rails.groups(:assets => %w(development test))) - # If you want your assets lazily compiled in production, use this line - # Bundler.require(:default, :assets, Rails.env) -end +# Require the gems listed in Gemfile, including any gems +# you've limited to :test, :development, or :production. +Bundler.require(*Rails.groups) module CafeGrader class Application < Rails::Application @@ -37,23 +34,19 @@ # Configure the default encoding used in templates for Ruby 1.9. config.encoding = "utf-8" - # Configure sensitive parameters which will be filtered from the log file. - config.filter_parameters += [:password] - # Enable escaping HTML in JSON. config.active_support.escape_html_entities_in_json = true + config.load_defaults 7.0 + + #disable active storage default routes, so the file won't be publicly available + #config.active_storage.draw_routes = false + # Use SQL instead of Active Record's schema dumper when creating the database. # This is necessary if your schema can't be completely dumped by the schema dumper, # like if you have constraints or database-specific column types # config.active_record.schema_format = :sql - # Enable the asset pipeline - config.assets.enabled = true - - # Version of your assets, change this if you want to expire all your assets - config.assets.version = '1.0' - # ---------------- IMPORTANT ---------------------- # If we deploy the app into a subdir name "grader", be sure to do "rake assets:precompile RAILS_RELATIVE_URL_ROOT=/grader" # moreover, using the following line instead also known to works