I would like to know the recommended approach to ensuring referential integrity. For example, if I had a comments table, I would like to make sure that the comments.post_id was not null and that it referred to an existing post.
Should I use an approach like this in the comment model: validates_presence_of :post validates_associated :post Or should I use the red hill plugin: http://www.redhillonrails.org/ Should I just assume ActiveRecord will keep the referential integrity? This does not seem like a popular approach. Here is another discussion on the topic: http://forum.softiesonrails.com/forums/3/topics/138 Thanks... --~--~---------~--~----~------------~-------~--~----~ Insoshi developer site: http://dogfood.insoshi.com/ Insoshi documentation: http://docs.insoshi.com/ You received this message because you are subscribed to the Google Groups "Insoshi" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/insoshi?hl=en -~----------~----~----~----~------~----~------~--~---
