# Be sure to restart your web server when you modify this file. # Uncomment below to force Rails into production mode when # you don't control web/app server and can't set it the proper way # ENV['RAILS_ENV'] ||= 'production' # Specifies gem version of Rails to use when vendor/rails is not present #RAILS_GEM_VERSION = '1.2.3' unless defined? RAILS_GEM_VERSION # Bootstrap the Rails environment, frameworks, and default configuration require File.join(File.dirname(__FILE__), 'boot') Rails::Initializer.run do |config| # Settings in config/environments/* take precedence over those specified here # Skip frameworks you're not going to use (only works if using vendor/rails) # config.frameworks -= [ :action_web_service, :action_mailer ] # Only load the plugins named here, by default all plugins in vendor/plugins are loaded # config.plugins = %W( exception_notification ssl_requirement ) # Add additional load paths for your own custom dirs # config.load_paths += %W( #{RAILS_ROOT}/extras ) # Force all environments to use the same logger level # (by default production uses :info, the others :debug) # config.log_level = :debug # Use the database for sessions instead of the file system # (create the session table with 'rake db:sessions:create') # config.action_controller.session_store = :active_record_store # Use SQL instead of Active Record's schema dumper when creating the test 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 # Activate observers that should always be running # config.active_record.observers = :cacher, :garbage_collector # Make Active Record use UTC-base instead of local time # config.active_record.default_timezone = :utc # See Rails::Configuration for more options config.action_controller.session = { :session_key => "_admiteer_session", :secret => "admiteer_secret" } end # Add new inflection rules using the following format # (all these examples are active by default): # Inflector.inflections do |inflect| # inflect.plural /^(ox)$/i, '\1en' # inflect.singular /^(ox)en/i, '\1' # inflect.irregular 'person', 'people' # inflect.uncountable %w( fish sheep ) # end Geocode.geocoder = Graticule.service(:yahoo).new 'ES6uizDV34EtuK4W3UYi8z7TxUGNUQy978KSE2K4YCAkdHip5hfiU2Oam2sBbZc6Xg--' GOOGLE_APPLICATION_ID = RAILS_ENV.eql?('production') ? 'ABQIAAAApSqZ4K81oRGDccdWxhrzhhQGC6nRXvIKBhr5yAwVjSRMJgM_kxTC9cUKiJFTTrHbfGybki8VPIzc5A' : 'ABQIAAAA3HdfrnxFAPWyY-aiJUxmqRTJQa0g3IQ9GZqIMmInSLzwtGDKaBQ0KYLwBEKSM7F9gCevcsIf6WPuIQ' Mime::Type.register "text/html;charset=utf-8", :map require 'pdf/writer' require 'active_record_uuid' ActionView::Base.field_error_proc = Proc.new do |html_tag, instance| error_class = "fieldWithErrors" if html_tag =~ /<(input|textarea|select)[^>]+class=/ class_attribute = html_tag =~ /class=['"]/ html_tag.insert(class_attribute + 7, "#{error_class} ") elsif html_tag =~ /<(input|textarea|select)/ first_whitespace = html_tag =~ /\s/ html_tag[first_whitespace] = " class='#{error_class}' " end html_tag end # this needs to be placed in a method or else rescue doesn't work def load_image_science require 'image_science' $image_science_installed = true rescue LoadError # in case they don't have it installed $image_science_installed = false end load_image_science Mime::Type.register "application/pdf", :pdf