module Representable::Cached::Serializer
Public Instance Methods
item_deserializer()
click to toggle source
for Deserializer::Collection. TODO: this is a temporary solution.
Calls superclass method
# File lib/representable/cached.rb, line 51 def item_deserializer @__item_deserializer ||= super.tap do |deserializer| deserializer.extend(Serializer) end end
prepare_for(mod, object)
click to toggle source
Calls superclass method
# File lib/representable/cached.rb, line 40 def prepare_for(mod, object) if representer = @binding.cached_representer return representer.update!(object) end # puts "--------> caching representer for #{object} in #{@binding.object_id}" @binding.cached_representer = super(mod, object) end