On Sep 9, 2009, at 5:56 PM, Chad Woolley wrote: > On Wed, Sep 9, 2009 at 4:02 PM, Rick DeNatale > <[email protected]> wrote: >> My normal practice when writing migrations which depend on model code >> is to put a migration specific model clase in the migration file >> itself, scoped inside the migration. The model mimics a subset of >> the >> one in app/models including only necessary attribute declarations and >> methods. > > Great idea, thanks...
This is also great way to define "don't exist anymore" associations - so you can rely on them being there for that migration whether they exist or not in your actual models. Just make sure to heed Rick's advice and put it inside your migration, otherwise dark spirits will come and steal your soul while you sleep. -- Jason --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" 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-core?hl=en -~----------~----~----~----~------~----~------~--~---
