root/trunk/config/environment.rb @ 67

Revision 67, 2.1 KB (checked in by dema, 7 years ago)

A whole bunch of housekeeping code:

  • Moved system initialization to hyperde_init.rb
  • Refactored the whole model generation schema (NavModelGenerator? is now AppModel?). Application model is only generated on demand by calling the AppModel?.sync method when going to the navigation controller (except on the console interface). This helps speed up web server initialization, scripts and automated tests.
  • Included system classes in AppModel?, including the new HyperDEConfiguration (in preparation for adding i18n support).
  • Fixed an old bug that used to leave garbage from other repositories (closes #18).
  • Added import/export for custom views (closes #49).
  • Fixed an old bug in the import script that would create duplicate context and index parameters. (It was caused by something deeper in the associations code). Closes #41.

Made the system more robust overall.

Line 
1# Be sure to restart your web server when you modify this file.
2
3# Uncomment below to force Rails into production mode when
4# you don't control web/app server and can't set it the proper way
5# ENV['RAILS_ENV'] ||= 'production'
6
7# Bootstrap the Rails environment, frameworks, and default configuration
8require File.join(File.dirname(__FILE__), 'boot')
9
10Rails::Initializer.run do |config|
11  # Settings in config/environments/* take precedence those specified here
12 
13  # Skip frameworks you're not going to use
14  config.frameworks -= [ :action_web_service, :action_mailer, :active_record ]
15
16  # Add additional load paths for your own custom dirs
17  config.load_paths += %W( #{RAILS_ROOT}/vendor/semanticrecord/lib )
18
19  # Force all environments to use the same logger level
20  # (by default production uses :info, the others :debug)
21  # config.log_level = :debug
22
23  # Use the database for sessions instead of the file system
24  # (create the session table with 'rake create_sessions_table')
25  # config.action_controller.session_store = :active_record_store
26
27  # Enable page/fragment caching by setting a file-based store
28  # (remember to create the caching directory and make it readable to the application)
29  # config.action_controller.fragment_cache_store = :file_store, "#{RAILS_ROOT}/cache"
30
31  # Activate observers that should always be running
32  # config.active_record.observers = :cacher, :garbage_collector
33
34  # Make Active Record use UTC-base instead of local time
35  # config.active_record.default_timezone = :utc
36 
37  # Use Active Record's schema dumper instead of SQL when creating the test database
38  # (enables use of different database adapters for development and test environments)
39  # config.active_record.schema_format = :ruby
40
41  # See Rails::Configuration for more options
42end
43
44# Add new inflection rules using the following format
45# (all these examples are active by default):
46# Inflector.inflections do |inflect|
47#   inflect.plural /^(ox)$/i, '\1en'
48#   inflect.singular /^(ox)en/i, '\1'
49#   inflect.irregular 'person', 'people'
50#   inflect.uncountable %w( fish sheep )
51# end
52
53# Include your application configuration below
54require 'hyperde_init'
Note: See TracBrowser for help on using the browser.