Switching to RVM, View tweaks

This commit is contained in:
2013-08-28 05:15:50 -07:00
parent 211d79cbcd
commit 10a1e4eb84
9 changed files with 67 additions and 8 deletions

View File

@@ -1,6 +1,7 @@
class Payment < ActiveRecord::Base
belongs_to :user
has_one :ipn
has_one :paypal_csv
attr_accessible :date, :user_id, :created_by, :amount
validates_presence_of :user_id, :date, :amount # not created_by

View File

@@ -1,4 +1,7 @@
<html><body>
<h2>PayPal IPN Records</h2>
<p>
<em>Automatically loaded from PayPal's servers</em>
</p>
<table>
<tr>
<th>Date</th>
@@ -30,4 +33,3 @@
</tr>
<% end %>
</table>
</body></html>

View File

@@ -1,7 +1,12 @@
<h1>Listing payments</h1>
<%= link_to 'New Payment', new_payment_path %>
<br />
<p>
<b>Create Payments:</b>
<%= link_to 'Manually', new_payment_path %> |
<%= link_to 'Batched CSV', paypal_csvs_path %> |
<%= link_to 'IPN', ipns_path %>
</p>
<table>
<tr>
<th>User</th>

View File

@@ -35,7 +35,12 @@
<% if @payment.ipn.present? %>
<p>
<%= link_to "Paid via PayPal", @payment.ipn %>
<%= link_to "Paid via PayPal (IPN)", @payment.ipn %>
</p>
<% end %>
<% if @payment.paypal_csv.present? %>
<p>
<%= link_to "Paid via PayPal (CSV)", @payment.paypal_csv %>
</p>
<% end %>

View File

@@ -1,4 +1,8 @@
<%= link_to "Upload CSV", new_paypal_csv_path %>
<h2>PayPal CSV Records</h2>
<p>
<%= link_to "Upload CSV", new_paypal_csv_path %>
</p>
<table>
<tr>
<th>Date</th>