Sha256: ee8920b3895778f48c8d4858ac5a335cb8a3ade4b69a1c27f102aefefb583dda
Contents?: true
Size: 366 Bytes
Versions: 1
Compression:
Stored size: 366 Bytes
Contents
module ActiveModel # DefaultSerializer # # Provides a constant interface for all items class DefaultSerializer attr_reader :object def initialize(object, options=nil) @object = object end def serializable_hash(*) return nil if @object.nil? @object.as_json end alias serializable_object serializable_hash end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
active_model_serializers_rails_2.3-0.9.0.pre1 | lib/active_model/default_serializer.rb |