ReinH (owner)

Revisions

  • 3f111c ReinH Wed Oct 28 15:47:55 -0700 2009
gist: 220938 Download_button fork
public
Public Clone URL: git://gist.github.com/220938.git
Embed All Files: show embed
has_many_through_association.rb #
1
2
3
4
5
6
7
        # TODO - add dependent option support
        def delete_records(records)
          klass = @reflection.through_reflection.klass
          records.each do |associate|
            klass.delete_all(construct_join_attributes(associate))
          end
        end