Merge pull request #1425 from beauby/extract-serializer-modules

[CLEANUP] Extract links and type-related methods to their own module.
This commit is contained in:
Benjamin Fleischer
2016-01-15 00:56:40 -06:00
4 changed files with 63 additions and 31 deletions

View File

@@ -209,7 +209,7 @@ module ActiveModel
end
def links_for(serializer)
serializer.links.each_with_object({}) do |(name, value), hash|
serializer._links.each_with_object({}) do |(name, value), hash|
hash[name] =
if value.respond_to?(:call)
link = Link.new(serializer)