-
Notifications
You must be signed in to change notification settings - Fork 1.1k
/
application.rb
77 lines (66 loc) · 2.5 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
require_relative "boot"
require "rails/all"
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(*Rails.groups)
module Consul
class Application < Rails::Application
# 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.
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
# 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
available_locales = [
"ar",
"de",
"en",
"es",
"fa",
"fr",
"gl",
"he",
"id",
"it",
"nl",
"pl",
"pt-BR",
"ru",
"sl",
"sq",
"so",
"sv",
"val",
"zh-CN",
"zh-TW"]
config.i18n.available_locales = available_locales
config.i18n.fallbacks = {
"fr" => "es",
"gl" => "es",
"it" => "es",
"pt-BR" => "es"
}
config.i18n.load_path += Dir[Rails.root.join("config", "locales", "**", "*.{rb,yml}")]
config.i18n.load_path += Dir[Rails.root.join("config", "locales", "custom", "**", "*.{rb,yml}")]
config.after_initialize { Globalize.set_fallbacks_to_all_available_locales }
config.assets.paths << Rails.root.join("app", "assets", "fonts")
# Do not swallow errors in after_commit/after_rollback callbacks.
config.active_record.raise_in_transactional_callbacks = true
# Add lib to the autoload path
config.autoload_paths << Rails.root.join("lib")
config.time_zone = "Madrid"
config.active_job.queue_adapter = :delayed_job
# CONSUL specific custom overrides
# Read more on documentation:
# * English: https://github.com/consul/consul/blob/master/CUSTOMIZE_EN.md
# * Spanish: https://github.com/consul/consul/blob/master/CUSTOMIZE_ES.md
#
config.autoload_paths << "#{Rails.root}/app/controllers/custom"
config.autoload_paths << "#{Rails.root}/app/models/custom"
config.paths["app/views"].unshift(Rails.root.join("app", "views", "custom"))
end
end
require "./config/application_custom.rb"