Skip to content

Commit 0ae4088

Browse files
committed
Define as_json directly
1 parent 1ea1da7 commit 0ae4088

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

lib/searchkick/hash_wrapper.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@ def to_h
1212
@attributes
1313
end
1414

15-
# for as_json
16-
alias_method :to_hash, :to_h
15+
def as_json(...)
16+
@attributes.as_json(...)
17+
end
1718

1819
def to_json(...)
1920
@attributes.to_json(...)

0 commit comments

Comments
 (0)