Refactor: introduce lazy association

This commit is contained in:
Benjamin Fleischer
2017-04-23 16:48:05 -05:00
parent 34d55e4729
commit 7697d9f5ec
7 changed files with 98 additions and 49 deletions

View File

@@ -0,0 +1,22 @@
module ActiveModel
class Serializer
class LazyAssociation < Field
def serializer
options[:serializer]
end
def include_data?
options[:include_data]
end
def virtual_value
options[:virtual_value]
end
def reflection
options[:reflection]
end
end
end
end