forked from saurabh/orbit4-5
60 lines
2.1 KiB
Ruby
60 lines
2.1 KiB
Ruby
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"
|
|
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)
|
|
|
|
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"
|
|
end
|
|
|
|
Dir.glob("#{Rails.root}/app/templates/*").each do |path|
|
|
config.assets.paths << "#{path}/assets/fonts"
|
|
end
|
|
|
|
# Ckeditor
|
|
config.autoload_paths += %W(#{config.root}/app/models/ckeditor)
|
|
|
|
# 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.
|
|
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
|