search for: current_payment_method_id

Displaying 1 result from an estimated 1 matches for "current_payment_method_id".

2008 Jul 16
2
belongs_to causing endless loop on first call to save!
...maryAccount < Account has_many :payment_methods, :foreign_key => "account_id" #using single table inheritance, which is why foreign key is not "primary_account_id" belongs_to :current_payment_method, :class_name => "PaymentMethod", :foreign_key => "current_payment_method_id" #points to same table, so I can have many payment_methods, but also mark as being the current one to bill ... class PaymentMethod < ActiveRecord::Base belongs_to :account #normal bidirectional association ... class CreditCard < PaymentMethod ... In the controller tier, I have a...