Skip to content

Commit 0bbc365

Browse files
author
David Heinemeier Hansson
committed
Style
1 parent 469a530 commit 0bbc365

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

lib/jbuilder.rb

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -242,14 +242,8 @@ def attributes!
242242
end
243243

244244
# Merges hash, array, or Jbuilder instance into current builder.
245-
def merge!(obj)
246-
hash_or_array =
247-
if ::Jbuilder === obj
248-
obj.attributes!
249-
else
250-
obj
251-
end
252-
245+
def merge!(object)
246+
hash_or_array = ::Jbuilder === object ? object.attributes! : object
253247
@attributes = _merge_values(@attributes, hash_or_array)
254248
end
255249

0 commit comments

Comments
 (0)