Skip to content

Commit

Permalink
Remove whiny_nils config from the rails guides
Browse files Browse the repository at this point in the history
This option was removed from master.

[ci skip]
  • Loading branch information
carolinemota committed Aug 26, 2013
1 parent 55870cd commit ec6ee1f
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions guides/source/configuring.md
Expand Up @@ -131,8 +131,6 @@ numbers. New applications filter out passwords by adding the following `config.f

* `config.beginning_of_week` sets the default beginning of week for the application. Accepts a valid week day symbol (e.g. `:monday`).

* `config.whiny_nils` enables or disables warnings when a certain set of methods are invoked on `nil` and it does not respond to them. Defaults to true in development and test environments.

### Configuring Assets

* `config.assets.enabled` a flag that controls whether the asset
Expand Down Expand Up @@ -632,11 +630,11 @@ WARNING: Some parts of your application, notably routing, are not yet set up at

### `Rails::Railtie#initializer`

Rails has several initializers that run on startup that are all defined by using the `initializer` method from `Rails::Railtie`. Here's an example of the `initialize_whiny_nils` initializer from Active Support:
Rails has several initializers that run on startup that are all defined by using the `initializer` method from `Rails::Railtie`. Here's an example of the `set_helpers_path` initializer from Action Controller:

```ruby
initializer "active_support.initialize_whiny_nils" do |app|
require 'active_support/whiny_nil' if app.config.whiny_nils
initializer "action_controller.set_helpers_path" do |app|
ActionController::Helpers.helpers_path = app.helpers_paths
end
```

Expand Down Expand Up @@ -670,20 +668,6 @@ Below is a comprehensive list of all the initializers found in Rails in the orde

* `i18n.callbacks` In the development environment, sets up a `to_prepare` callback which will call `I18n.reload!` if any of the locales have changed since the last request. In production mode this callback will only run on the first request.

* `active_support.initialize_whiny_nils` Requires `active_support/whiny_nil` if `config.whiny_nils` is true. This file will output errors such as:

```
Called id for nil, which would mistakenly be 4 - if you really wanted the id of nil, use object_id
```

And:

```
You have a nil object when you didn't expect it!
You might have expected an instance of Array.
The error occurred while evaluating nil.each
```

* `active_support.deprecation_behavior` Sets up deprecation reporting for environments, defaulting to `:log` for development, `:notify` for production and `:stderr` for test. If a value isn't set for `config.active_support.deprecation` then this initializer will prompt the user to configure this line in the current environment's `config/environments` file. Can be set to an array of values.

* `active_support.initialize_time_zone` Sets the default time zone for the application based on the `config.time_zone` setting, which defaults to "UTC".
Expand Down

0 comments on commit ec6ee1f

Please sign in to comment.