Permalink
Browse files

small changes

  • Loading branch information...
1 parent 101b249 commit 7dc0a91c5e8a390348a6b03cb2a8f9f85c97a82c @nov committed May 23, 2011
View
1 app/controllers/payments_controller.rb
@@ -3,7 +3,6 @@ class PaymentsController < ApplicationController
def show
@payment = Payment.find_by_identifier! params[:id]
- @details = @payment.details
end
def create
View
5 app/controllers/top_controller.rb
@@ -1,4 +1,9 @@
class TopController < ApplicationController
def index
+ @grouped_payments = [
+ [Payment.new, Payment.recurring.build ],
+ [Payment.digital.build, Payment.digital.recurring.build ],
+ [Payment.digital.popup.build, Payment.digital.popup.recurring.build]
+ ]
end
end
View
2 app/views/payments/show.html.erb
@@ -7,5 +7,5 @@
</span>
<% end %>
</h1>
- <pre><%= JSON.pretty_generate JSON.parse(@details.to_json) %></pre>
+ <pre><%= JSON.pretty_generate JSON.parse(@payment.details.to_json) %></pre>
</article>
View
6 app/views/top/index.html.erb
@@ -2,11 +2,7 @@
<h1><%=t 'top.title' %></h1>
<p><%=t 'top.pay_for_me' %></p>
<p><%=t 'top.set_your_own' %></p>
- <% [
- [Payment.new, Payment.recurring.build ],
- [Payment.digital.build, Payment.digital.recurring.build ],
- [Payment.digital.popup.build, Payment.digital.popup.recurring.build]
- ].each do |payments| %>
+ <% @grouped_payments.each do |payments| %>
<% payment = payments.first %>
<%= content_tag :section, :class => payment.ux_type do %>
<h2>

0 comments on commit 7dc0a91

Please sign in to comment.