> > > The only code I can see that affects triggers is in the original > PostgreSQLAdapter#disable_referential_integrity method. It disables > triggers during a block and re-enables them afterwards. As far as I > remember, this is used to load fixtures while temporarily suspending the > triggers. As fixture files are loaded one by one without regard for > foreign keys, the temporarily violated constraints would cause an > exception. I don't think the behavior you're seeing is related to views >
Yes that's where the problem occurs. That code iterates over the tables collection. The problem is that you have alias_method_chain on tables which returns the views as well as the tables and of course the code fails when it hits a view. I commented out the alias method chain line and it works. I hope I didn't break something else. > > > Do I have to make my models which derive from view inherit from > > AR:View? is > > No, that's just for convenience if you like to re-use associations from > other models. > > Ah. Ok thanks. --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

