Skip to content

Commit b756042

Browse files
Simplify pluck(:value).first to pick(:value)
1 parent 5e8a26d commit b756042

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activerecord/lib/active_record/internal_metadata.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def []=(key, value)
3232
def [](key)
3333
return unless enabled?
3434

35-
where(key: key).pluck(:value).first
35+
where(key: key).pick(:value)
3636
end
3737

3838
# Creates an internal metadata table with columns +key+ and +value+

0 commit comments

Comments
 (0)