-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathapplication.rb
52 lines (38 loc) · 1.93 KB
/
application.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# frozen_string_literal: true
require File.expand_path('boot', __dir__)
# Pick the frameworks you want:
require 'active_model/railtie'
require 'active_record/railtie'
require 'action_controller/railtie'
require 'rails/test_unit/railtie'
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module Raar
class Application < Rails::Application
attr_accessor :settings
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 8.0
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
#
# Please, add to the `ignore` list any other `lib` subdirectories that do
# not contain `.rb` files, or that should not be reloaded or eager loaded.
# Common ones are `templates`, `generators`, or `middleware`, for example.
config.autoload_lib(ignore: %w[tasks capistrano])
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake time:zones:all" for a time zone names list. Default is UTC.
config.time_zone = 'Bern'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
config.i18n.default_locale = :en
# Only loads a smaller set of middleware suitable for API only apps.
# Middleware like session, flash, cookies can be added back manually.
# Skip views, helpers and assets when generating a new resource.
config.api_only = true
config.middleware.insert_before Rack::ETag, Rack::Deflater
config.active_record.raise_on_assign_to_attr_readonly = false
config.active_record.generate_secure_token_on = :create
end
end