Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Another fix.

  • Loading branch information...
commit 8401aa8bb281b6dd6cc7013a0ca41d168ef9e067 1 parent 0b34dc2
@scrozier authored
Showing with 3 additions and 5 deletions.
  1. +2 −2 app/models/chargeable.rb
  2. +1 −3 app/models/donation.rb
View
4 app/models/chargeable.rb
@@ -60,7 +60,7 @@ def reserve_and_donate
if @make_donation
unless @donation.card_valid?
- flash.now[:error] = 'Invalid credit card information.' + object_errors(@donation)
+ flash.now[:error] = 'Invalid credit card information.'
render :action => :show
return
end
@@ -127,7 +127,7 @@ def process_donation
success, message = @donation.process_payment
unless success
- flash.now[:error] = 'Credit card transaction could not be processed: ' + message + contact_us
+ flash[:error] = 'Credit card transaction could not be processed: ' + message + contact_us
if @concert
redirect_to show_ticket_form_path(@concert.ident_string) and return
else
View
4 app/models/donation.rb
@@ -40,9 +40,7 @@ def card_valid?
:verification_value => @credit_card_verification,
:type => @credit_card_type,
)
- return true if @credit_card.valid?
- @credit_card.errors.full_messages{|m| errors.add_to_base(m)}
- return false
+ @credit_card.valid?
end
def name_and_address
Please sign in to comment.
Something went wrong with that request. Please try again.