rails/rails — pull request #6077 by dmitriy-kiriyenko (2012-04-30 07:18:24+00:00)
Title: Replace boolean argument with an options hash.

_Remake of #2173_.

Boolean arguments are bad. You guys knew it when changing `ActiveRecord::Base#save` from `save(false)` to `save(:validate => false)`.

I suggest also remove boolean argument `include_seconds` from `distance_of_time_in_words` and `time_ago_in_words`, replacing in with `include_seconds => true` hash option. Of course to keep it as deprecated option. This is somehow a resurrection of #898.

Also it makes `time_ago_in_words` to pass options hash, including a `locale` key, which makes in compatible with `distance_of_time_in_words`.