Skip to content

Instantly share code, notes, and snippets.

Avatar

Nick Hoffman nickhoffman

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