aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/active_record_querying.md1
-rw-r--r--guides/source/active_support_instrumentation.md11
-rw-r--r--guides/source/configuring.md2
-rw-r--r--guides/source/debugging_rails_applications.md2
4 files changed, 14 insertions, 2 deletions
diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md
index 71a03e11d9..cc6e08aaec 100644
--- a/guides/source/active_record_querying.md
+++ b/guides/source/active_record_querying.md
@@ -59,6 +59,7 @@ To retrieve objects from the database, Active Record provides several finder met
The methods are:
+* `annotate`
* `find`
* `create_with`
* `distinct`
diff --git a/guides/source/active_support_instrumentation.md b/guides/source/active_support_instrumentation.md
index 89e0e3afa8..d7dbc5cea8 100644
--- a/guides/source/active_support_instrumentation.md
+++ b/guides/source/active_support_instrumentation.md
@@ -692,5 +692,16 @@ ActiveSupport::Notifications.subscribe "my.custom.event" do |name, started, fini
end
```
+You also have the option to call instrument without passing a block. This lets you leverage the
+instrumentation infrastructure for other messaging uses.
+
+```ruby
+ActiveSupport::Notifications.instrument "my.custom.event", this: :data
+
+ActiveSupport::Notifications.subscribe "my.custom.event" do |name, started, finished, unique_id, data|
+ puts data.inspect # {:this=>:data}
+end
+```
+
You should follow Rails conventions when defining your own events. The format is: `event.library`.
If your application is sending Tweets, you should create an event named `tweet.twitter`.
diff --git a/guides/source/configuring.md b/guides/source/configuring.md
index b167e1a452..448c02425f 100644
--- a/guides/source/configuring.md
+++ b/guides/source/configuring.md
@@ -583,7 +583,7 @@ Defaults to `'signed cookie'`.
The default setting is `true`, which uses the partial at `/admin/articles/_article.erb`. Setting the value to `false` would render `/articles/_article.erb`, which is the same behavior as rendering from a non-namespaced controller such as `ArticlesController`.
* `config.action_view.raise_on_missing_translations` determines whether an
- error should be raised for missing translations.
+ error should be raised for missing translations. This defaults to `false`.
* `config.action_view.automatically_disable_submit_tag` determines whether
`submit_tag` should automatically disable on click, this defaults to `true`.
diff --git a/guides/source/debugging_rails_applications.md b/guides/source/debugging_rails_applications.md
index 3a383cbd4d..77513c3a84 100644
--- a/guides/source/debugging_rails_applications.md
+++ b/guides/source/debugging_rails_applications.md
@@ -147,7 +147,7 @@ TIP: The default Rails log level is `debug` in all environments.
### Sending Messages
-To write in the current log use the `logger.(debug|info|warn|error|fatal)` method from within a controller, model, or mailer:
+To write in the current log use the `logger.(debug|info|warn|error|fatal|unknown)` method from within a controller, model, or mailer:
```ruby
logger.debug "Person attributes hash: #{@person.attributes.inspect}"