Skip to content

Commit

Permalink
Merge a43a6a3 into 9436d73
Browse files Browse the repository at this point in the history
  • Loading branch information
svasva committed Jan 27, 2014
2 parents 9436d73 + a43a6a3 commit 0273c44
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/active_model/serializable.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
module ActiveModel
module Serializable
def as_json(options={})
options = options.to_hash if options.respond_to?(:to_hash)
if root = options.fetch(:root, json_key)
hash = { root => serializable_object }
hash.merge!(serializable_data)
Expand Down

0 comments on commit 0273c44

Please sign in to comment.