2012-06-23 06:19:03 +08:00
|
|
|
require File.expand_path('../boot', __FILE__)
|
|
|
|
|
2016-04-20 22:29:29 +08:00
|
|
|
require 'rails/all'
|
|
|
|
|
2014-03-28 21:31:21 +08:00
|
|
|
Bundler.require(:default, Rails.env)
|
2012-06-23 06:19:03 +08:00
|
|
|
|
|
|
|
module WBlog
|
|
|
|
class Application < Rails::Application
|
|
|
|
|
2015-04-07 22:13:16 +08:00
|
|
|
config.i18n.available_locales = [:en, :'zh-CN']
|
|
|
|
#I18n.config.enforce_available_locales = true
|
|
|
|
config.i18n.default_locale = (ENV['LOCALE'] || 'zh-CN').to_sym
|
2014-03-28 21:31:21 +08:00
|
|
|
config.time_zone = 'Beijing'
|
|
|
|
config.action_controller.action_on_unpermitted_parameters = :log
|
|
|
|
|
2014-06-08 21:45:36 +08:00
|
|
|
config.filter_parameters += [ :password ]
|
|
|
|
|
2014-03-28 21:31:21 +08:00
|
|
|
# generators
|
|
|
|
config.generators.assets = false
|
|
|
|
config.generators.helper = false
|
|
|
|
config.generators do |g|
|
|
|
|
g.test_framework :rspec, view_specs: false
|
|
|
|
end
|
2014-05-25 00:54:52 +08:00
|
|
|
|
|
|
|
# action mailer
|
|
|
|
config.action_mailer.preview_path = "#{Rails.root}/spec/mailers/previews"
|
2012-06-23 06:19:03 +08:00
|
|
|
end
|
|
|
|
end
|