diff options
| author | hukl <hukl@eight.local> | 2009-01-29 20:41:18 +0100 |
|---|---|---|
| committer | hukl <hukl@eight.local> | 2009-01-29 20:41:18 +0100 |
| commit | b298d3e8eeb10903bd4640dab7c11d0dc1be9d38 (patch) | |
| tree | d8d0a8449972a46e551be3b94e7dd02b6107b119 /config/initializers | |
initial import with edge rails included as a submodule
Diffstat (limited to 'config/initializers')
| -rw-r--r-- | config/initializers/backtrace_silencers.rb | 7 | ||||
| -rw-r--r-- | config/initializers/inflections.rb | 10 | ||||
| -rw-r--r-- | config/initializers/mime_types.rb | 5 | ||||
| -rw-r--r-- | config/initializers/new_rails_defaults.rb | 19 | ||||
| -rw-r--r-- | config/initializers/session_store.rb | 15 |
5 files changed, 56 insertions, 0 deletions
diff --git a/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb new file mode 100644 index 0000000..c2169ed --- /dev/null +++ b/config/initializers/backtrace_silencers.rb | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | # Be sure to restart your server when you modify this file. | ||
| 2 | |||
| 3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. | ||
| 4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } | ||
| 5 | |||
| 6 | # You can also remove all the silencers if you're trying do debug a problem that might steem from framework code. | ||
| 7 | # Rails.backtrace_cleaner.remove_silencers! \ No newline at end of file | ||
diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb new file mode 100644 index 0000000..d531b8b --- /dev/null +++ b/config/initializers/inflections.rb | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | # Be sure to restart your server when you modify this file. | ||
| 2 | |||
| 3 | # Add new inflection rules using the following format | ||
| 4 | # (all these examples are active by default): | ||
| 5 | # ActiveSupport::Inflector.inflections do |inflect| | ||
| 6 | # inflect.plural /^(ox)$/i, '\1en' | ||
| 7 | # inflect.singular /^(ox)en/i, '\1' | ||
| 8 | # inflect.irregular 'person', 'people' | ||
| 9 | # inflect.uncountable %w( fish sheep ) | ||
| 10 | # end | ||
diff --git a/config/initializers/mime_types.rb b/config/initializers/mime_types.rb new file mode 100644 index 0000000..72aca7e --- /dev/null +++ b/config/initializers/mime_types.rb | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | # Be sure to restart your server when you modify this file. | ||
| 2 | |||
| 3 | # Add new mime types for use in respond_to blocks: | ||
| 4 | # Mime::Type.register "text/richtext", :rtf | ||
| 5 | # Mime::Type.register_alias "text/html", :iphone | ||
diff --git a/config/initializers/new_rails_defaults.rb b/config/initializers/new_rails_defaults.rb new file mode 100644 index 0000000..8ec3186 --- /dev/null +++ b/config/initializers/new_rails_defaults.rb | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | # Be sure to restart your server when you modify this file. | ||
| 2 | |||
| 3 | # These settings change the behavior of Rails 2 apps and will be defaults | ||
| 4 | # for Rails 3. You can remove this initializer when Rails 3 is released. | ||
| 5 | |||
| 6 | if defined?(ActiveRecord) | ||
| 7 | # Include Active Record class name as root for JSON serialized output. | ||
| 8 | ActiveRecord::Base.include_root_in_json = true | ||
| 9 | |||
| 10 | # Store the full class name (including module namespace) in STI type column. | ||
| 11 | ActiveRecord::Base.store_full_sti_class = true | ||
| 12 | end | ||
| 13 | |||
| 14 | # Use ISO 8601 format for JSON serialized times and dates. | ||
| 15 | ActiveSupport.use_standard_json_time_format = true | ||
| 16 | |||
| 17 | # Don't escape HTML entities in JSON, leave that for the #json_escape helper. | ||
| 18 | # if you're including raw json in an HTML page. | ||
| 19 | ActiveSupport.escape_html_entities_in_json = false \ No newline at end of file | ||
diff --git a/config/initializers/session_store.rb b/config/initializers/session_store.rb new file mode 100644 index 0000000..b3e1098 --- /dev/null +++ b/config/initializers/session_store.rb | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | # Be sure to restart your server when you modify this file. | ||
| 2 | |||
| 3 | # Your secret key for verifying cookie session data integrity. | ||
| 4 | # If you change this key, all old sessions will become invalid! | ||
| 5 | # Make sure the secret is at least 30 characters and all random, | ||
| 6 | # no regular words or you'll be exposed to dictionary attacks. | ||
| 7 | ActionController::Base.session = { | ||
| 8 | :key => '_cccms_session', | ||
| 9 | :secret => 'b50f62033369e6039f2ece511f83f10f70301024709e189ab28d42379a26b7bfd0739fb83d89b6b76dba350569e5b9d83ee4abedbd9da468deea963512e4102b' | ||
| 10 | } | ||
| 11 | |||
| 12 | # Use the database for sessions instead of the cookie-based default, | ||
| 13 | # which shouldn't be used to store highly confidential information | ||
| 14 | # (create the session table with "rake db:sessions:create") | ||
| 15 | # ActionController::Base.session_store = :active_record_store | ||
