aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/generator/templates/app/config/environment.rb
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2009-06-17 12:31:54 +0200
committerJosé Valim <jose.valim@gmail.com>2009-06-19 16:11:53 +0200
commit615527dcb030ce9ad14e3d12e42a63f745fd9337 (patch)
tree9effd511bbe1e5c99b720c0dbcbe7cec76a8b730 /railties/lib/generator/templates/app/config/environment.rb
parentfef38fd542504d564e647bf5a7e54ca1c23a5f59 (diff)
downloadrails-615527dcb030ce9ad14e3d12e42a63f745fd9337.tar.gz
rails-615527dcb030ce9ad14e3d12e42a63f745fd9337.tar.bz2
rails-615527dcb030ce9ad14e3d12e42a63f745fd9337.zip
Allow user to skip ActiveRecord, TestUnit and/or Prototype. However any customization should be done with templates.
Diffstat (limited to 'railties/lib/generator/templates/app/config/environment.rb')
-rw-r--r--railties/lib/generator/templates/app/config/environment.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/railties/lib/generator/templates/app/config/environment.rb b/railties/lib/generator/templates/app/config/environment.rb
index 4a2df36307..d4e2c9bdff 100644
--- a/railties/lib/generator/templates/app/config/environment.rb
+++ b/railties/lib/generator/templates/app/config/environment.rb
@@ -26,10 +26,14 @@ Rails::Initializer.run do |config|
# Skip frameworks you're not going to use. To use Rails without a database,
# you must remove the Active Record framework.
+<%- if options[:no_activerecord] -%>
+ config.frameworks -= [ :active_record ]
+<%- else -%>
# config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
# Activate observers that should always be running
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
+<%- end -%>
# 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.
@@ -38,4 +42,4 @@ Rails::Initializer.run do |config|
# 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}')]
# config.i18n.default_locale = :de
-end \ No newline at end of file
+end