On Monday 20 April 2009, Tim Uckun wrote:
> > 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.

Indeed, that had escaped my tests. I've pushed an updated version 
version to github.

Michael
-- 
Michael Schuerig
mailto:mich...@schuerig.de
http://www.schuerig.de/michael/


--~--~---------~--~----~------------~-------~--~----~
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to