Sha256: e8e27b5c797a10988ce7ef8d20caa039c30f87df1d17d572f5ce1a650459bda6
Contents?: true
Size: 369 Bytes
Versions: 8
Compression:
Stored size: 369 Bytes
Contents
module DynamicScaffold module JSONObject module Model extend ActiveSupport::Concern module ClassMethods def dump(obj) obj = obj.attributes if obj.is_a? ActiveModel::Attributes obj.to_json if obj end def load(source) new(source ? JSON.parse(source) : {}) end end end end end
Version data entries
8 entries across 8 versions & 1 rubygems