2 # This file is part of SMR.
4 # SMR is free software: you can redistribute it and/or modify it under the
5 # terms of the GNU General Public License as published by the Free Software
6 # Foundation, either version 3 of the License, or (at your option) any later
9 # SMR is distributed in the hope that it will be useful, but WITHOUT ANY
10 # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 # A PARTICULAR PURPOSE. See the GNU General Public License for more details.
13 # You should have received a copy of the GNU General Public License along with
14 # SMR. If not, see <http://www.gnu.org/licenses/>.
16 require File.expand_path('../boot', __FILE__)
22 # If you have a Gemfile, require the gems listed there, including any gems
23 # you've limited to :test, :development, or :production.
24 Bundler.require(:default, Rails.env) if defined?(Bundler)
26 # Setup database backed session store
27 ActiveRecord::SessionStore::Session.table_name = 'user_session'
30 # Groups all constants and classes that form the SMR application. Application
31 # wide constants are defined directly on this module.
35 # Security.id to be used for cash deposits.
36 # - defined here to have the entire app use only one
37 # - see db/seeds.rb especially
41 # Organization owning a Security by default. The universe is always there.
42 ID_UNIVERSE_ORGANIZATION = 1
45 # Default currency code. Taken if nothing else is available.
46 # Note that SMR is using currency codes as defined by the ISO 4217 standard.
47 DEFAULT_CURRENCY = 'EUR'
50 # Definition of what is considered a blank time value.
51 # For most database columny this means whatever they define is not defined.
52 # Compare with TIME_ZERO to find out.
53 TIME_ZERO = Time.at(0)
55 class Application < Rails::Application
56 # Settings in config/environments/* take precedence over those specified here.
57 # Application configuration should go into files in config/initializers
58 # -- all .rb files in that directory are automatically loaded.
60 # Custom directories with classes and modules you want to be autoloadable.
61 config.autoload_paths += %W(#{config.root}/lib)
62 config.autoload_paths += Dir["#{config.root}/lib/**/"]
64 # Only load the plugins named here, in the order given (default is alphabetical).
65 # :all can be used as a placeholder for all plugins not explicitly named.
66 # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
68 # Activate observers that should always be running.
69 # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
71 config.active_record.pluralize_table_names = false
73 # Use native SQL schema to support database specifics such as triggers and special indices
74 config.active_record.schema_format = :sql
76 # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
77 # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
78 # config.time_zone = 'Central Time (US & Canada)'
80 # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
81 # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
82 # config.i18n.default_locale = :de
84 # JavaScript files you want as :defaults (application.js is always included).
85 # config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
86 #config.action_view.javascript_expansions[:defaults] = %w()
88 # Configure the default encoding used in templates for Ruby 1.9.
89 config.encoding = "utf-8"
91 # Configure sensitive parameters which will be filtered from the log file.
92 config.filter_parameters += [:password]