# ActiveMerchant / ARB Code Advice

**URL:** <https://www.ruby-forum.com/t/activemerchant-arb-code-advice/152066>\
**Category:** Rails\
**Created:** [October 29, 2008, 6:20pm UTC](https://www.ruby-forum.com/t/activemerchant-arb-code-advice/152066 "2008-10-29T18:20:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeremy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/82dd89/32.png) [@jeremy](https://www.ruby-forum.com/u/jeremy)\
**Post date:** [October 29, 2008, 6:20pm UTC](https://www.ruby-forum.com/t/activemerchant-arb-code-advice/152066/1 "2008-10-29T18:20:44Z")

</div>

Would anyone with some experience at best practices with getting  
recurring billing working be willing to look at my code and perhaps  
point out how to improve and get my validations and objects going in  
the right order? What I have written works fine except for saving the  
user\_id to the subscriptions table, but if something isn’t entered  
right, it all blows up. I just can’t wrap my head around the logic I  
guess for correctly running this stuff…

My Code:  
[http://www.pastie.org/303289](http://www.pastie.org/303289)

Any guidance would be appreciated!
