Skip to content

Instantly share code, notes, and snippets.

@tknarr
tknarr / active_model_serializer_plus.rb
Last active October 17, 2015 20:04
Module to provide a standard attributes= method for ActiveModel classes needing JSON serialization/deserialization. SUPERSEDED by gem active_model_serializer_plus https://github.com/tknarr/active_model_serializer_plus
# ActiveModelSerializerPlus - enhanced deserialization for ActiveModel/ActiveRecord classes
# SUPERSEDED by gem active_model_serializer_plus https://github.com/tknarr/active_model_serializer_plus
# Usage: require 'active_model_serializer_plus' in the files your ActiveModel or ActiveRecord classes are
# defined in, and then include ActiveModelSerializerPlus::Assignment in the classes. This will add a
# default :assignment= method to those classes that's suitable for automatically deserializing classes
# serialized with the standard JSON and Xml serializers.
# The MIT License (MIT)
#