Permalink
Browse files

Even more polish of the default configration files and split off the …

…session store configuration into its own file
  • Loading branch information...
dhh committed Nov 30, 2008
1 parent c5f461d commit 6e66e7d6460b99bb0877a891aa3fbb789b563123
@@ -0,0 +1,13 @@
# Your secret key for verifying cookie session data integrity.
# If you change this key, all old sessions will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
ActionController::Base.session = {
:session_key => '_<%= app_name %>_session',
:secret => '<%= app_secret %>'
}

# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
# (create the session table with "rake db:sessions:create")
# ActionController::Base.session_store = :active_record_store
@@ -12,7 +12,7 @@
# -- all .rb files in that directory are automatically loaded.
# Add additional load paths for your own custom dirs
# config.load_paths += %W( #{RAILS_ROOT}/extras )
# config.load_paths += %w( #{RAILS_ROOT}/extras )

This comment has been minimized.

@Roman2K

Roman2K Dec 1, 2008

%W was correct. %w won’t perform interpolation.

# Specify gems that this application depends on and have them installed with rake gems:install
# config.gem "bj"
@@ -28,35 +28,14 @@
# you must remove the Active Record framework.
# config.frameworks -= [ :active_record, :active_resource, :action_mailer ]

# Make Time.zone default to the specified zone, and make Active Record store time values
# in the database in UTC, and return them converted to the specified local zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Comment line to use default local time.
# 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.
config.time_zone = 'UTC'

# The internationalization framework can be changed to have another default locale (default is :en) or more load paths.
# All files from config/locales/*.rb,yml are added automatically.
# 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}')]

This comment has been minimized.

@Roman2K

Roman2K Dec 1, 2008

This line should rather read:
config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]

# config.i18n.default_locale = :de

# Your secret key for verifying cookie session data integrity.
# If you change this key, all old sessions will become invalid!
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
config.action_controller.session = {
:session_key => '_<%= app_name %>_session',
:secret => '<%= app_secret %>'
}

# Use the database for sessions instead of the cookie-based default,
# which shouldn't be used to store highly confidential information
# (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, :forum_observer
end
end
@@ -20,3 +20,8 @@
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test

# 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

3 comments on commit 6e66e7d

@henrik

This comment has been minimized.

Copy link
Contributor

henrik replied Dec 1, 2008

So it wasn’t first changed in this commit, but: on line 32 of the new version, observers are assigned as “config.active_record.observers = :cacher, :garbage_collector, :forum_observer”. Is that missing square brackets?

@dennisreimann

This comment has been minimized.

Copy link

dennisreimann replied Dec 1, 2008

yes, they are missing.

@dhh

This comment has been minimized.

Copy link
Member Author

dhh replied Dec 2, 2008

Thanks for the code review, guys. Got it in on http://github.com/rails/rails/commit/bf024b6a11253b3d2599caf41f7ccf2d31e68cb3

Please sign in to comment.