Displaying 1 result from an estimated 1 matches for "display_credit".
Did you mean:
display_credits
2006 May 15
0
acts_as_list, move_higher, odd indexing behaviour?
...gs_to :account_transaction, :foreign_key => ''transaction_id''
belongs_to :account
acts_as_list :scope => :transaction_id
belongs_to :credit_type
end
#unit test
class AccountTransactionTest < Test::Unit::TestCase
fixtures :account_transactions, :credits
def display_credits(transaction)
transaction.credits.each_index do |x|
credit = transaction.credits[x]
puts " index #{x} id #{credit.id} position #{credit.position}"
end
end
def test_credits
assert_equal @account_transaction.credits[0].id, @first_credit.id
assert_equ...