Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
class PurchasedItemMailer < ActionMailer::Base | ||
default from: "Givespend <admin@givespend.com>" | ||
def notify_buyer txn_id | ||
@transaction = Transaction.find(txn_id) | ||
mail subject: "Thanks for shopping on Givespend", to: @transaction.email | ||
end | ||
|
||
def notify_seller txn_id | ||
@transaction = Transaction.find(txn_id) | ||
mail subject: "Someone has bought #{@transaction.item.name}", to: @transaction.item.user.email | ||
end | ||
end |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Thanks for shopping on Givespend. Just to review, here is what you've purchased: | ||
<br><br> | ||
<%= @transaction.item.name %><br> | ||
<%= @transaction.item.description %><br> | ||
<br> | ||
We've notified the seller of this item via email, and they should get back to you shortly. Contact us for any help/support. | ||
<br><br> | ||
--Givespend Team |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
Good job! You just sold "<%= @transaction.item.name %>" on Givespend. In doing so, you've provided <%= @transaction.item.nonprofit_url %> with a little more funding. Please refer below for the delivery details: | ||
<br><br> | ||
<%= @transaction.email %> | ||
<br> | ||
<%= @transaction.shipping_info %> | ||
<br><br> | ||
Thanks, | ||
<br> | ||
Givespend Team |
This file contains 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
This file contains 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
This file contains 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
6 changes: 6 additions & 0 deletions
6
db/migrate/20131112014702_add_shipping_info_and_email_to_transactions.rb
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
class AddShippingInfoAndEmailToTransactions < ActiveRecord::Migration | ||
def change | ||
add_column :transactions, :shipping_info, :string | ||
add_column :transactions, :email, :string | ||
end | ||
end |
This file contains 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