Created
December 10, 2008 05:36
-
-
Save ahoward/34251 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
has_many(:buckets, :dependent => :destroy) do | |
def self.extend_object buckets | |
super | |
ensure | |
buckets.class # hack to know about .each | |
buckets.each do |bucket| | |
bucket.collection = buckets.collection | |
end | |
end | |
def collection | |
proxy_owner | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment