repair code reviews, improve environment configs

This commit is contained in:
Rishabh Saxena 2016-07-18 12:04:10 +05:30
parent 223a0eead9
commit 25c0046290
10 changed files with 65 additions and 67 deletions

View file

@ -1,7 +1,6 @@
.price-tags {
list-style-type: none;
padding-top: 2rem;
// display: inline-block;
}
.price-tags li {
line-height: 40px;

View file

@ -81,7 +81,7 @@ class Ability
can :index, Ticket
can :manage, TicketPurchase, user_id: user.id
can :manage, Payment, user_id: user.id
can [:new], Payment, user_id: user.id
can [:create, :destroy], Subscription, user_id: user.id

View file

@ -26,7 +26,7 @@ class Ticket < ActiveRecord::Base
end
def unpaid?(user)
ticket_purchases.find_by(user: user, paid: false).present?
ticket_purchases.unpaid.by_user(user).present?
end
def total_price(user, paid: false)

View file

@ -93,7 +93,7 @@
-if @tickets.any?
= "(#{@tickets.first.price.symbol}#{humanized_money @total_price})"
%ul
.col.md-4
.col-md-12
- @ticket_payments.each_pair do |ticket_id, tickets|
%li
= @total_quantity[ticket_id]
@ -102,6 +102,7 @@
for
= tickets.first.price.symbol
= humanized_money tickets.first.price
%br
- if @tickets.any?
= link_to 'Buy more tickets', conference_tickets_path(@conference.short_title), class: "btn btn-default"
- else

View file

@ -29,4 +29,4 @@
%tr
%td{:colspan => "5"} No payments have been attempted.
.pull-right
= link_to "Conference Registration", conference_conference_registrations_path(@conference.short_title), class: 'btn btn-primary'
= link_to "Conference Registration", conference_conference_registration_path(@conference.short_title), class: 'btn btn-primary'