search for: account_transactions

Displaying 2 results from an estimated 2 matches for "account_transactions".

2006 May 15
0
acts_as_list, move_higher, odd indexing behaviour?
...Credit < ActiveRecord::Base belongs_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,...
2006 Aug 17
2
RJS - slower than normal RHTML?
I know that isn''t supposed to be the case, and it usually isn''t, but today, I''ve run across a situation where rendering the same partial through RJS is taking about 5 times longer than rendering the partial in the RHTML. I have in my main RHTML <tbody id="account_transactions"> <%= render :partial => ''account_transactions/transaction'', :collection => @account_transactions, :locals => {:nobalance => false, :goto => false} %> </tbody> By putting a benchmark around just the render line, it renders on average 0.3 sec...