Hello,
I put the method below in my controller, but I feel it should be in my
Billing::Shared module so it can be used by other controllers as well.
However, this introduces the Can''t Dup NilClass message when running a
server in development mode.
Do you have any suggestions how I can DRY this code up and keep class
caching OFF?
All the best,
CmdJohnson
---
  ##############################################################################
  # setup_gateway
  #
  # not so DRY:
  # copied from Billing::Shared to circumvent Can''t Dup NilClass bug
  ##############################################################################
  def setup_gateway
    test = true
    test = false if RAILS_ENV.eql? "production"
    options = {
      :login => property(:paypal_api_login),
      :password => property(:paypal_api_password),
      :signature => property(:paypal_api_signature),
      :test => test
    }
    ActiveMerchant::Billing::PaypalExpressRecurringGateway.new(options)
  end
-- 
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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.