Skip to content

Instantly share code, notes, and snippets.

View paddyinpdx's full-sized avatar

Patrick Barnes paddyinpdx

  • Portland, Oregon
View GitHub Profile
@paddyinpdx
paddyinpdx / gist:895428
Created March 30, 2011 22:17
Mongoid 2.0 Workaround Methods for Update/Delete actions when using references_and_referenced_in_many
# tag.rb
class Tag
include Mongoid::Document
# Fields
field :title
# Associations
references_and_referenced_in_many :related, :class_name => "Tag"