So I have a User model that :has_many other models like Documents, Videos, Posts and the like. My question arises when I execute a "do" block from the User model like so:
has_many :posts do
def recent
find(:all, :order => 'created_at desc', :limit => 12)
end
end
This just lets me call something like user.posts.recent to find only those posts associated with the User. With this in place, how can I still add a :dependent => :destroy or :dependent => :delete_all to this association? Everything I have tried so far has errored out on me.