From 816e15d6269ff994ac7ee9e0d391ed74187ed98a Mon Sep 17 00:00:00 2001 From: Prathamesh Sonpatki Date: Sun, 10 Jul 2016 20:42:50 +0530 Subject: [PATCH 1/5] Add note about `config.annotations.register_directories` option in the guides [ci skip] - Followup of #25692. --- guides/source/command_line.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/guides/source/command_line.md b/guides/source/command_line.md index f766403228..ed8251b0e6 100644 --- a/guides/source/command_line.md +++ b/guides/source/command_line.md @@ -497,7 +497,13 @@ app/models/article.rb: NOTE. When using specific annotations and custom annotations, the annotation name (FIXME, BUG etc) is not displayed in the output lines. -By default, `rails notes` will look in the `app`, `config`, `db`, `lib` and `test` directories. If you would like to search other directories, you can provide them as a comma separated list in an environment variable `SOURCE_ANNOTATION_DIRECTORIES`. +By default, `rails notes` will look in the `app`, `config`, `db`, `lib` and `test` directories. If you would like to search other directories, you can configure them using `config.annotations.register_directories` option. + +```ruby +config.annotations.register_directories("spec", "vendor") +``` + +You can also provide them as a comma separated list in the environment variable `SOURCE_ANNOTATION_DIRECTORIES`. ```bash $ export SOURCE_ANNOTATION_DIRECTORIES='spec,vendor' From 3bc34f596b87c25fec62bc82c6a4ae898a1af846 Mon Sep 17 00:00:00 2001 From: Prathamesh Sonpatki Date: Sun, 10 Jul 2016 21:17:10 +0530 Subject: [PATCH 2/5] Add `config.assets.quiet` to configuration guide [ci skip] --- guides/source/configuring.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/guides/source/configuring.md b/guides/source/configuring.md index 34878e5c38..fe59155db0 100644 --- a/guides/source/configuring.md +++ b/guides/source/configuring.md @@ -181,6 +181,8 @@ pipeline is enabled. It is set to `true` by default. * `config.assets.logger` accepts a logger conforming to the interface of Log4r or the default Ruby `Logger` class. Defaults to the same configured at `config.logger`. Setting `config.assets.logger` to `false` will turn off served assets logging. +* `config.assets.quiet` disables logging of assets requests. Set to `true` by default in `development.rb`. + ### Configuring Generators Rails allows you to alter what generators are used with the `config.generators` method. This method takes a block: From bf06cdf7730f8d71969a251eedbb904152dd78c3 Mon Sep 17 00:00:00 2001 From: Prathamesh Sonpatki Date: Sun, 10 Jul 2016 21:46:20 +0530 Subject: [PATCH 3/5] The `to_query` method on Array objects uses `key[] as the prefix, not `_key_[]` [ci skip] --- guides/source/active_support_core_extensions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md index e0b6f2f820..57fa713371 100644 --- a/guides/source/active_support_core_extensions.md +++ b/guides/source/active_support_core_extensions.md @@ -368,7 +368,7 @@ account.to_query('company[name]') so its output is ready to be used in a query string. -Arrays return the result of applying `to_query` to each element with `_key_[]` as key, and join the result with "&": +Arrays return the result of applying `to_query` to each element with `key[]` as key, and join the result with "&": ```ruby [3.4, -45.6].to_query('sample') From c58dcaf0ce53568c5760d7970155f93cec8ba84d Mon Sep 17 00:00:00 2001 From: Prathamesh Sonpatki Date: Sat, 16 Jul 2016 15:14:19 +0530 Subject: [PATCH 4/5] Fix documentation of `index` option for the `add_reference` method [ci skip] - Followup of https://github.com/rails/rails/pull/23179. --- .../connection_adapters/abstract/schema_statements.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index 396cb0b07a..cffd7e8e81 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -790,7 +790,7 @@ module ActiveRecord # [:type] # The reference column type. Defaults to +:integer+. # [:index] - # Add an appropriate index. Defaults to false. + # Add an appropriate index. Defaults to true. # See #add_index for usage of this option. # [:foreign_key] # Add an appropriate foreign key constraint. Defaults to false. From a11abf19ee608ab08558cc7fade0a48a5f9ed91b Mon Sep 17 00:00:00 2001 From: Iain Beeston Date: Thu, 21 Jul 2016 13:00:17 +0100 Subject: [PATCH 5/5] Removed reference to callback_terminator.rb in docs That file has been removed and replaced with new_framework_defaults.rb --- guides/source/configuring.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/source/configuring.md b/guides/source/configuring.md index fe59155db0..cdba8332f8 100644 --- a/guides/source/configuring.md +++ b/guides/source/configuring.md @@ -604,7 +604,7 @@ There are a few configuration options available in Active Support: * `config.active_support.time_precision` sets the precision of JSON encoded time values. Defaults to `3`. -* `ActiveSupport.halt_callback_chains_on_return_false` specifies whether Active Record and Active Model callback chains can be halted by returning `false` in a 'before' callback. When set to `false`, callback chains are halted only when explicitly done so with `throw(:abort)`. When set to `true`, callback chains are halted when a callback returns `false` (the previous behavior before Rails 5) and a deprecation warning is given. Defaults to `true` during the deprecation period. New Rails 5 apps generate an initializer file called `callback_terminator.rb` which sets the value to `false`. This file is *not* added when running `rails app:update`, so returning `false` will still work on older apps ported to Rails 5 and display a deprecation warning to prompt users to update their code. +* `ActiveSupport.halt_callback_chains_on_return_false` specifies whether Active Record and Active Model callback chains can be halted by returning `false` in a 'before' callback. When set to `false`, callback chains are halted only when explicitly done so with `throw(:abort)`. When set to `true`, callback chains are halted when a callback returns `false` (the previous behavior before Rails 5) and a deprecation warning is given. Defaults to `true` during the deprecation period. New Rails 5 apps generate an initializer file called `new_framework_defaults.rb` which sets the value to `false`. This file is *not* added when running `rails app:update`, so returning `false` will still work on older apps ported to Rails 5 and display a deprecation warning to prompt users to update their code. * `ActiveSupport::Logger.silencer` is set to `false` to disable the ability to silence logging in a block. The default is `true`.