5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-22 22:46:22 +00:00
panel/config/application.rb

54 lines
1.6 KiB
Ruby
Raw Normal View History

2019-03-26 15:32:20 +00:00
# frozen_string_literal: true
2018-01-02 17:19:25 +00:00
require_relative 'boot'
2019-03-26 15:32:20 +00:00
require 'rails'
2018-01-02 17:19:25 +00:00
# Pick the frameworks you want:
2019-03-26 15:32:20 +00:00
require 'active_model/railtie'
require 'active_job/railtie'
require 'active_record/railtie'
2019-08-29 17:54:19 +00:00
require 'active_storage/engine'
2019-03-26 15:32:20 +00:00
require 'action_controller/railtie'
require 'action_mailer/railtie'
2019-11-07 16:09:01 +00:00
# require 'action_mailbox/engine'
2019-08-29 17:54:19 +00:00
require 'action_text/engine'
2019-03-26 15:32:20 +00:00
require 'action_view/railtie'
2018-01-02 17:19:25 +00:00
# require "action_cable/engine"
2019-03-26 15:32:20 +00:00
require 'sprockets/railtie'
require 'rails/test_unit/railtie'
2018-01-02 17:19:25 +00:00
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module Sutty
2019-07-12 17:11:24 +00:00
# Sutty!
2018-01-02 17:19:25 +00:00
class Application < Rails::Application
2019-07-12 17:11:24 +00:00
# Initialize configuration defaults for originally generated Rails
# version.
2020-12-24 18:02:03 +00:00
config.load_defaults 6.1
2018-01-02 17:19:25 +00:00
2019-07-12 17:11:24 +00:00
# Settings in config/environments/* take precedence over those
2019-08-29 17:54:19 +00:00
# specified here. Application configuration can go into files in
2019-07-12 17:11:24 +00:00
# config/initializers -- all .rb files in that directory are
2019-08-29 17:54:19 +00:00
# automatically loaded after loading the framework and any gems in
# your application.
2019-07-12 17:11:24 +00:00
config.action_dispatch
.rescue_responses['Pundit::NotAuthorizedError'] = :forbidden
2019-08-22 01:09:29 +00:00
config.active_storage.variant_processor = :vips
config.after_initialize do
ActiveStorage::DirectUploadsController.include ActiveStorage::AuthenticatedDirectUploadsController
I18n.available_locales.each do |locale|
translations = I18n.t(:email_address, locale: locale)
next unless translations.is_a? Hash
EmailAddress::Config.error_messages translations.transform_keys(&:to_s), locale.to_s
end
end
2018-01-02 17:19:25 +00:00
end
end