Module: Lycra::Serializer::Model::InstanceMethods

Defined in:
lib/lycra/serializer/model.rb

Instance Method Summary collapse

Instance Method Details

#reloadObject



23
24
25
26
# File 'lib/lycra/serializer/model.rb', line 23

def reload
  @serializer = nil
  super
end

#serializer(serializer_class = nil) ⇒ Object



28
29
30
31
# File 'lib/lycra/serializer/model.rb', line 28

def serializer(serializer_class=nil)
  return serializer_class.new(self) if serializer_class
  @serializer ||= self.class.serializer.new(self)
end