Sha256: 7d2a73abb5656ed8a1d6b37d7c3cbb72654d11a0a8cdd3cade64ee9abd2a238a
Contents?: true
Size: 495 Bytes
Versions: 8
Compression:
Stored size: 495 Bytes
Contents
module GdatastoreMapper module Associations class HasMany attr_accessor :owner, :belonging def initialize(owner, belonging) @owner = owner @belonging = belonging end def belonging_klass @belonging.to_s.classify.constantize end def owner_attributes { (@owner.class.to_s.underscore + '_id') => @owner.id } end def belonging_id @belonging.to_s + '_id' end end end end
Version data entries
8 entries across 8 versions & 1 rubygems