Add URL to serializers (closes #61)

Thanks so much to @vanstee for the initial
implementation!
This commit is contained in:
Yehuda Katz
2012-05-16 18:35:30 -07:00
parent 43f32c868a
commit 56b61b1532
6 changed files with 40 additions and 0 deletions

View File

@@ -380,6 +380,10 @@ module ActiveModel
@object, @options = object, options
end
def url_options
@options[:url_options]
end
# Returns a json representation of the serializable
# object including the root.
def as_json(options=nil)