Created
March 14, 2013 09:10
-
-
Save thomasstr/5159964 to your computer and use it in GitHub Desktop.
Getting error in purchase_controller.rb:37:in `credit'
Line 4 here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
undefined method `on' for #<ActiveModel::Errors:0x007ff72d404300> | |
def credit | |
render :action => 'index' and return unless @cc.valid? | |
@response = paypal_gateway.purchase(price_in_cents, @cc, | |
:ip => request.remote_ip, | |
:billing_address => params[:billing_address]) | |
if @response.success? | |
@purchase = Purchase.create(:response => @response) | |
redirect_to :action => "complete", :id => @purchase | |
else | |
paypal_error(@response) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment