ReinH (owner)

Revisions

  • 30287d ReinH Wed Oct 28 15:50:26 -0700 2009
gist: 220946 Download_button fork
public
Public Clone URL: git://gist.github.com/220946.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