lib/rest_framework/serializers.rb
# Convert the object (record or recordset) to Ruby primitives.
Convert the object (record or recordset) to Ruby primitives.
Convert the object ( record or recordset ) to Ruby primitives .
def serialize
    raise "No object available to serialize!" unless @object
    if @object.is_a?(Enumerable)
      return @object.map { |r| r.serializable_hash(self.get_serializer_config) }
    end
    return @object.serializable_hash(self.get_serializer_config)
  end
def serialize raise "No object available to serialize!" unless @object if @object . is_a? ( Enumerable ) return @object . map { | r | r . serializable_hash ( self . get_serializer_config ) } end return @object . serializable_hash ( self . get_serializer_config ) end
Convert the object (record or recordset) to Ruby primitives.
Convert the object ( record or recordset ) to Ruby primitives .