Don't write code that's already written.
The rails-recurly-subscription-saas application is on GitHub.
Generate an app in minutes using an application template:
$ rails new rails-recurly-subscription-saas -m https://raw.github.com/RailsApps/rails-composer/master/composer.rb -T
You get a complete membership site with recurring billing for your web startup.
Do you prefer Stripe for billing? There's a rails-stripe-membership-saas application.