Sha256: db2b88237e3e1ce8dcc7c29f4a81dc62cd86f6802c03cf96181bcad889c090e9
Contents?: true
Size: 645 Bytes
Versions: 13
Compression:
Stored size: 645 Bytes
Contents
module NinjaModel module Associations class HasManyAssociation < CollectionAssociation #def insert_record(record, validate = true, raise = false) # set_owner_attributes(record) # if raise # record.save!(:validate => validate) # else # record.save(:validate => validate) # end #end #def association_scope # scope = super # puts "primary_key: #{reflection.primary_key}" # puts "foreign_key: #{reflection.foreign_key}" # scope = scope.where(reflection.foreign_key => owner.send(reflection.primary_key)) # scope #end end end end
Version data entries
13 entries across 13 versions & 1 rubygems