Skip to content

Instantly share code, notes, and snippets.

@abrambailey
Created January 9, 2015 03:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abrambailey/faf8b145b3a8f9db4524 to your computer and use it in GitHub Desktop.
Save abrambailey/faf8b145b3a8f9db4524 to your computer and use it in GitHub Desktop.
#config/boot.rb is loaded
require File.expand_path('../boot', __FILE__)
#reuquires all the railties (active model, active record, etc)
require 'rails/all'
if defined?(Bundler)
# If you precompile assets before deploying to production, use this line
#Bundler.require(*Rails.groups(:assets => %w(development test)))
Bundler.require(*Rails.groups(:assets => %w(development test))) if defined?(Bundler)
# If you want your assets lazily compiled in production, use this line
# Bundler.require(:default, :assets, Rails.env)
end
module HearingTracker
class Application < Rails::Application
config.to_prepare do
# Load application's model / class decorators
Dir.glob(File.join(File.dirname(__FILE__), "../app/**/*_decorator*.rb")) do |c|
Rails.configuration.cache_classes ? require(c) : load(c)
end
# Load application's view overrides
Dir.glob(File.join(File.dirname(__FILE__), "../app/overrides/*.rb")) do |c|
Rails.configuration.cache_classes ? require(c) : load(c)
end
end
# The creation of a module specifically for your application is part of the groundwork for
# supporting running multiple Rails applications in the same process.
# 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.
# Custom directories with classes and modules you want to be autoloadable.
# config.autoload_paths += %W(#{config.root}/extras)
# Only load the plugins named here, in the order given (default is alphabetical).
# :all can be used as a placeholder for all plugins not explicitly named.
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
# Activate observers that should always be running.
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
# 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 = :de
# Configure the default encoding used in templates for Ruby 1.9.
config.encoding = "utf-8"
# Configure sensitive parameters which will be filtered from the log file.
config.filter_parameters += [:password]
# Use SQL instead of Active Record's schema dumper when creating the database.
# This is necessary if your schema can't be completely dumped by the schema dumper,
# like if you have constraints or database-specific column types
# config.active_record.schema_format = :sql
# Enforce whitelist mode for mass assignment.
# This will create an empty whitelist of attributes available for mass-assignment for all models
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
# parameters by using an attr_accessible or attr_protected declaration.
# config.active_record.whitelist_attributes = true
#config.assets.precompile += %w( *.js *.css )
config.assets.initialize_on_precompile = false
#routes.named_routes[:forem] ||= Journey::Route.new(nil, nil, Journey::Path::Pattern.new("\forums"), {})
# Enable the asset pipeline
config.assets.enabled = true
config.action_controller.assets_dir = "#{File.dirname(File.dirname(__FILE__))}/public"
# Version of your assets, change this if you want to expire all your assets
config.assets.version = '1.0'
config.autoload_paths += Dir["#{Rails.root}/lib/modules"]
#config.autoload_paths += %W(#{config.root}/app/models/ckeditor)
#added to watch fonts folder and which files to process
config.assets.paths << "#{Rails.root}/app/assets/pdf"
config.assets.paths += Dir["#{Rails.root}/app/assets/fonts"]
#config.assets.paths << "#{Rails.root}/app/assets/fonts/open_sans"
config.assets.precompile += %w( .svg .eot .woff .ttf )
config.exceptions_app = self.routes
config.exceptions_app = lambda do |env|
ExceptionsController.action(:render_error).call(env)
end
config.active_record.raise_in_transactional_callbacks = true
#def log_processing
# super
# if logger && logger.info?
# logger.info(" HTTP Referer: #{request.referer}")
# end
#end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment