Skip to content

Commit 7c2c7f3

Browse files
committed
Use to_h
1 parent 05b11fc commit 7c2c7f3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

app/concerns/liquid_droppable.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ def each
2323

2424
def as_json
2525
return {} unless defined?(self.class::METHODS)
26-
Hash[self.class::METHODS.map { |m| [m, send(m).as_json]}]
26+
27+
self.class::METHODS.to_h { |m| [m, send(m).as_json] }
2728
end
2829
end
2930

0 commit comments

Comments
 (0)