diff options
| author | erdgeist <erdgeist@erdgeist.org> | 2026-06-24 04:13:16 +0200 |
|---|---|---|
| committer | erdgeist <erdgeist@erdgeist.org> | 2026-06-24 04:13:16 +0200 |
| commit | e0a7e0fec760ba12c8067a37e10c96f1f05876e2 (patch) | |
| tree | d0cf745592a46aee4d4913911fd34c7c24515220 /config/application.rb | |
| parent | 6424e10be5a89f175a74c71c55660412a169b8b8 (diff) | |
Stage 1 complete: Rails 2.3.5 to Rails 3.2.22.5 upgrade
- Converted plugins to gems (Gemfile)
- Updated config structure (application.rb, boot.rb, environment.rb)
- Converted routes to Rails 3 DSL
- Converted named_scope to scope throughout models
- Converted find(:all, :conditions) to where() chains
- Fixed has_many :order to use ordering scope
- Updated session store and secret token configuration
- Fixed exception_notification middleware configuration
- Patched Ruby 2.4 / Rails 3.2 incompatibilities:
- Integer/Float duration arithmetic (ActiveSupport)
- Arel visit_Integer for PostgreSQL adapter
- create_database String/Integer coercion
- ActionController consider_all_requests_local
- Migrated taggings schema for acts-as-taggable-on
- Replaced dynamic_form gem with custom form_error_messages helper
- Fixed Rails 3 block helper syntax (form_for, form_tag, fields_for)
- Fixed admin layout yield
- Updated test suite for Rails 3 APIs
Diffstat (limited to 'config/application.rb')
| -rw-r--r-- | config/application.rb | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/config/application.rb b/config/application.rb new file mode 100644 index 0000000..9b7ae67 --- /dev/null +++ b/config/application.rb | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | # Put this in config/application.rb | ||
| 2 | require File.expand_path('../boot', __FILE__) | ||
| 3 | |||
| 4 | require 'rails/all' | ||
| 5 | |||
| 6 | Bundler.require(:default, Rails.env) if defined?(Bundler) | ||
| 7 | |||
| 8 | require 'action_controller' | ||
| 9 | |||
| 10 | module ActionController | ||
| 11 | class Base | ||
| 12 | def self.consider_all_requests_local=(val) | ||
| 13 | # no-op: controlled via config.consider_all_requests_local in environment files | ||
| 14 | end | ||
| 15 | end | ||
| 16 | end | ||
| 17 | |||
| 18 | module Cccms | ||
| 19 | class Application < Rails::Application | ||
| 20 | config.autoload_paths += [config.root.join('lib')] | ||
| 21 | config.encoding = 'utf-8' | ||
| 22 | # Settings in config/environments/* take precedence over those specified here. | ||
| 23 | # Application configuration should go into files in config/initializers | ||
| 24 | # -- all .rb files in that directory are automatically loaded. | ||
| 25 | |||
| 26 | # Add additional load paths for your own custom dirs | ||
| 27 | # config.load_paths += %W( #{RAILS_ROOT}/extras ) | ||
| 28 | |||
| 29 | # Only load the plugins named here, in the order given (default is alphabetical). | ||
| 30 | # :all can be used as a placeholder for all plugins not explicitly named | ||
| 31 | # config.plugins = [ :exception_notification, :ssl_requirement, :all ] | ||
| 32 | |||
| 33 | # Allowed Tags | ||
| 34 | # strong em b i p code pre tt samp kbd var sub sup dfn cite big small | ||
| 35 | # address hr br div span h1 h2 h3 h4 h5 h6 ul ol li dt dd abbr | ||
| 36 | # acronym a img blockquote del ins | ||
| 37 | |||
| 38 | # Allowed Attributes: | ||
| 39 | # href src width height alt cite datetime title class name xml:lang abbr)) | ||
| 40 | |||
| 41 | # Add tags to whitelist with: | ||
| 42 | # config.action_view.sanitized_allowed_tags = 'table', 'tr', 'td' | ||
| 43 | |||
| 44 | # Add attributes to whitelist with: | ||
| 45 | # config.action_view.sanitized_allowed_attributes = 'id', 'class', 'style' | ||
| 46 | |||
| 47 | # Activate observers that should always be running | ||
| 48 | # config.active_record.observers = :cacher, :garbage_collector, :forum_observer | ||
| 49 | |||
| 50 | # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone. | ||
| 51 | # Run "rake -D time" for a list of tasks for finding time zone names. | ||
| 52 | config.time_zone = 'Berlin' | ||
| 53 | |||
| 54 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. | ||
| 55 | # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')] | ||
| 56 | config.i18n.default_locale = :de | ||
| 57 | |||
| 58 | config.filter_parameters += [:password, :password_confirmation] | ||
| 59 | end | ||
| 60 | end | ||
