Skip to content

Commit

Permalink
Style
Browse files Browse the repository at this point in the history
  • Loading branch information
dhh committed Jan 22, 2021
1 parent 469a530 commit 0bbc365
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions lib/jbuilder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -242,14 +242,8 @@ def attributes!
end

# Merges hash, array, or Jbuilder instance into current builder.
def merge!(obj)
hash_or_array =
if ::Jbuilder === obj
obj.attributes!
else
obj
end

def merge!(object)
hash_or_array = ::Jbuilder === object ? object.attributes! : object
@attributes = _merge_values(@attributes, hash_or_array)
end

Expand Down

0 comments on commit 0bbc365

Please sign in to comment.