orbit4-5/config/application.rb

60 lines
2.1 KiB
Ruby
Raw Normal View History

require File.expand_path('../boot', __FILE__)
# Pick the frameworks you want:
# require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "sprockets/railtie"
require "rails/test_unit/railtie"
2014-04-01 07:10:21 +00:00
require "mongoid/railtie"
# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env)
2014-04-14 03:27:09 +00:00
module Orbit
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.
# require "#{Rails.root}/app/models/template.rb"
# config.assets.paths << "#{Rails.root}/app/templates/*/css"
Dir.glob("#{Rails.root}/app/templates/*").each do |path|
config.assets.paths << "#{path}/assets/stylesheets"
end
Dir.glob("#{Rails.root}/app/templates/*").each do |path|
config.assets.paths << "#{path}/assets/javascripts"
end
Dir.glob("#{Rails.root}/app/templates/*").each do |path|
config.assets.paths << "#{path}/assets/images"
2014-04-01 07:10:21 +00:00
end
Dir.glob("#{Rails.root}/app/templates/*").each do |path|
config.assets.paths << "#{path}/assets/fonts"
end
2014-05-01 08:44:01 +00:00
# Ckeditor
config.autoload_paths += %W(#{config.root}/app/models/ckeditor)
2014-04-01 07:10:21 +00:00
# tell the I18n library where to find your translations
I18n.load_path += Dir[Rails.root.join('lib', 'locale', '*.{rb,yml}')]
# set default locale to something other than :en
I18n.default_locale = :en
I18n.available_locales = [:en, :zh_tw]
config.autoload_paths += %W(#{config.root}/lib)
# 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.
2014-05-01 08:44:01 +00:00
config.time_zone = 'Asia/Taipei'
# 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 = :de
end
end