aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@squareup.com>2014-09-19 10:30:31 -0700
committerTamir Duberstein <tamird@squareup.com>2014-09-19 10:42:58 -0700
commit994d3ebe9bea5164a4383d408f9a0b6733ae2bc7 (patch)
tree7bf7f63836a42a54d5e3e6aa3dc9dd56ecbfe9d6
parent620f4a4fc962c863b91a51876ffdf58f33bedb9c (diff)
downloadrails-994d3ebe9bea5164a4383d408f9a0b6733ae2bc7.tar.gz
rails-994d3ebe9bea5164a4383d408f9a0b6733ae2bc7.tar.bz2
rails-994d3ebe9bea5164a4383d408f9a0b6733ae2bc7.zip
Standardize on `Rails.application` [ci skip]
This seems to be the style settled on in most of the templates.
-rw-r--r--guides/source/4_2_release_notes.md2
-rw-r--r--guides/source/active_job_basics.md2
-rw-r--r--guides/source/upgrading_ruby_on_rails.md6
-rw-r--r--railties/CHANGELOG.md2
-rw-r--r--railties/lib/rails/application.rb2
5 files changed, 7 insertions, 7 deletions
diff --git a/guides/source/4_2_release_notes.md b/guides/source/4_2_release_notes.md
index 5aed0c9358..f3f6942135 100644
--- a/guides/source/4_2_release_notes.md
+++ b/guides/source/4_2_release_notes.md
@@ -322,7 +322,7 @@ Please refer to the [Changelog][railties] for detailed changes.
namespace: my_app_development
# config/production.rb
- MyApp::Application.configure do
+ Rails.application.configure do
config.middleware.use ExceptionNotifier, config_for(:exception_notification)
end
```
diff --git a/guides/source/active_job_basics.md b/guides/source/active_job_basics.md
index 7b3081993d..f2831defe6 100644
--- a/guides/source/active_job_basics.md
+++ b/guides/source/active_job_basics.md
@@ -138,7 +138,7 @@ You can easily change your adapter:
```ruby
# be sure to have the adapter gem in your Gemfile and follow the adapter specific
# installation and deployment instructions
-YourApp::Application.config.active_job.queue_adapter = :sidekiq
+Rails.application.config.active_job.queue_adapter = :sidekiq
```
diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md
index 4e538693f7..80e82aa9ea 100644
--- a/guides/source/upgrading_ruby_on_rails.md
+++ b/guides/source/upgrading_ruby_on_rails.md
@@ -810,8 +810,8 @@ Rails 4.0 extracted Active Resource to its own gem. If you still need the featur
```ruby
# config/initializers/secret_token.rb
- Myapp::Application.config.secret_token = 'existing secret token'
- Myapp::Application.config.secret_key_base = 'new secret key base'
+ Rails.application.config.secret_token = 'existing secret token'
+ Rails.application.config.secret_key_base = 'new secret key base'
```
Please note that you should wait to set `secret_key_base` until you have 100% of your userbase on Rails 4.x and are reasonably sure you will not need to rollback to Rails 3.x. This is because cookies signed based on the new `secret_key_base` in Rails 4.x are not backwards compatible with Rails 3.x. You are free to leave your existing `secret_token` in place, not set the new `secret_key_base`, and ignore the deprecation warnings until you are reasonably sure that your upgrade is otherwise complete.
@@ -1105,7 +1105,7 @@ You need to change your session key to something new, or remove all sessions:
```ruby
# in config/initializers/session_store.rb
-AppName::Application.config.session_store :cookie_store, key: 'SOMETHINGNEW'
+Rails.application.config.session_store :cookie_store, key: 'SOMETHINGNEW'
```
or
diff --git a/railties/CHANGELOG.md b/railties/CHANGELOG.md
index 0543b57ad4..2e7f134101 100644
--- a/railties/CHANGELOG.md
+++ b/railties/CHANGELOG.md
@@ -73,7 +73,7 @@
namespace: my_app_development
# config/production.rb
- MyApp::Application.configure do
+ Rails.application.configure do
config.middleware.use ExceptionNotifier, config_for(:exception_notification)
end
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb
index 67d5bac700..bc966e87c6 100644
--- a/railties/lib/rails/application.rb
+++ b/railties/lib/rails/application.rb
@@ -217,7 +217,7 @@ module Rails
# namespace: my_app_development
#
# # config/production.rb
- # MyApp::Application.configure do
+ # Rails.application.configure do
# config.middleware.use ExceptionNotifier, config_for(:exception_notification)
# end
def config_for(name)