aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_support_core_extensions.md
diff options
context:
space:
mode:
Diffstat (limited to 'guides/source/active_support_core_extensions.md')
-rw-r--r--guides/source/active_support_core_extensions.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/active_support_core_extensions.md b/guides/source/active_support_core_extensions.md
index 057651e0cf..8c9a890a4d 100644
--- a/guides/source/active_support_core_extensions.md
+++ b/guides/source/active_support_core_extensions.md
@@ -2045,10 +2045,10 @@ The method `index_with` generates a hash with the elements of an enumerable as k
is either a passed default or returned in a block.
```ruby
-%i( title body created_at ).index_with { |attr_name| public_send(attr_name) }
+%i( title body created_at ).index_with { |attr_name| post.public_send(attr_name) }
# => { title: "hey", body: "what's up?", … }
-WEEKDAYS.index_with([ Interval.all_day ])
+WEEKDAYS.index_with(Interval.all_day)
# => { monday: [ 0, 1440 ], … }
```