I’m having trouble getting a migration to work.
I’ve got an Account model with the following association:
:class_name => ‘AuditEntry’,
:order => ‘updated_at DESC’,
:conditions => “transaction_type LIKE ‘%verify’ AND content LIKE
I’ve got another model Subscription which belongs_to :account, and has
lvp = account.last_verified_payment
When I try to use this method in a migration, it throws a NoMethod
error for :last_verified_payment.
This only happens in the migration though. The migration didn’t touch
either the accounts nor audit_entries tables. I’ve even gone so far
as running rake db:migrate under rdebug, and stopping just before the
call to account.last_verified_payment, displaying which Account
instance it’s using, verifying that the NoMethod is being raised, and
in a parallel console session, getting the same Account and
Subscription, and invoking both the
Subscription#calculate_last_payment_date, and the
Any ideas what’s going on?