Say I have: class Relationship < ActiveRecord::Base belongs_to :parent, :polymorphic => true end and then several models like: class Person < ActiveRecord::Base has_many :parents, :as => :parent, :class_name => "Relationship" end I do not want to allow a person to be deleted if they are still being used by a relationship. I think I could come up with a way to do this with Relationship.find(:first. Probably return just the id. If I get anything back, the validate method could fail. Something like that. But I''m wondering if using "rules" inside of PostgreSQL would be significantly faster? I have never done rules so I''m a little timid. Any advice? Thank you, Perry -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---