lib/helpers/controller_helpers.rb in wepay-rails-0.1.95 vs lib/helpers/controller_helpers.rb in wepay-rails-0.1.96

- old
+ new

@@ -1,11 +1,11 @@ module WepayRails module Helpers module ControllerHelpers - def redirect_to_wepay_for_auth(wepayable_object, scope=WepayRails::Configuration.settings[:scope]) - redirect_to wepay_gateway.auth_code_url(wepayable_object, scope) + def redirect_to_wepay_for_auth(wepayable_object) + redirect_to wepay_gateway.auth_code_url(wepayable_object) end # @deprecated Use wepay_gateway instead of gateway def gateway warn "[DEPRECATION] Use wepay_gateway instead of gateway" @@ -29,10 +29,10 @@ def initialize_wepay_access_token(wepayable_object) #auth_code) auth_code = wepayable_object.send(WepayRails::Configuration.wepayable_column.to_sym) session[unique_wepay_access_token_key] = wepay_gateway.access_token(auth_code) return rescue WepayRails::Exceptions::ExpiredTokenError => e - redirect_to_wepay_for_auth(wepayable_object, WepayRails::Configuration.settings[:scope]) and return + redirect_to_wepay_for_auth(wepayable_object) and return end # Since we are saving the access token in the session, # ensure key uniqueness. Might be a good idea to have this # be a setting in the wepay.yml file. \ No newline at end of file