Skip to content

Commit

Permalink
Use marginally more efficient call to fetch by moving default to a block
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbranson committed Jun 3, 2015
1 parent 3a02ef8 commit 76777b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/active_model/serializer/adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def meta_key
end

def root
@options.fetch(:root, serializer.json_key)
@options.fetch(:root) { serializer.json_key }
end

def include_meta(json)
Expand Down

0 comments on commit 76777b6

Please sign in to comment.