The first thing to determine is which bit is failing. Is the code in
the each loop actually running? Does the save work (check the return
code from save)? Have a look at the Rails Guide on debugging for help
on how to debug the code.
Not directly related to the question but I find it hard to believe
that the way you are going about this is ideal. I suggest it would be
better not do directly differentiate between debits and credits as you
are, but just to have positive or negative transaction values.
However as I know little about what you are trying to achieve this may
be incorrect.
Also I suspect that transaction may be a reserved word in rails, so
this might give you problems.
Colin
>
> Thanks,
>
> Dan Doherty
>
> --
> 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
rubyonra...@googlegroups.com.
> To unsubscribe from this group, send email to
rubyonrails-ta...@googlegroups.com.
> For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.
>