On Jan 16, 2009, at 3:19 PM, Wes Gamble wrote:
> Here's my real problem:
>
> I am trying to load a fixture into a database which acts as a  
> secondary
> DB to my application.
>
> The fixture file uses Erb to generate appropriate fixtures based on
> something like this:
>
> <% Invoice.find_all_by_im_invoice_state("Paid").each do |inv| %>
>  ...generate a bunch of fixtures...
> <% end %>
>
> The problem is that the Invoice class has an association which is not
> present in the DB into which I am loading the data.  The Invoice  
> class's
> table is present, which is all that I need to properly generate the
> fixtures.  However, the class for this other has_many association that
> I'm not interested in is not present.
>
> So I'd like to temporarily remove the association for the duration of
> the fixture load.  Hoping I can just monkey patch within the Erb.
>
> Thanks,
> Wes


Unless you reference the association, it won't be accessed. Am I (Are  
we) missing something here?  Just don't use the association.

-Rob

Rob Biedenharn          http://agileconsultingllc.com
[email protected]



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to