Skip to content

Commit

Permalink
bugfix: when upgrading and the limit was nil, errors would occur. The…
Browse files Browse the repository at this point in the history
… negative class also wasn't having much effect and the light grey number were hardly visible
  • Loading branch information
Kieran Pilkington authored and jamis committed May 26, 2009
1 parent a42095f commit c6f6dd1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion app/helpers/subscriptions_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def balance_cell(container, options={})
classes << "negative" if balance < 0
classes << "current_balance"

if container.is_a?(Account) && container.credit_card?
if container.is_a?(Account) && container.credit_card? && !container.limit.blank?
percentage_used = container.limit.abs.to_i == 0 ? 100 :
((container.balance.abs.to_f / container.limit.abs.to_f) * 100).to_i
classes << if percentage_used >= Account::DEFAULT_LIMIT_VALUES[:critical]: "critical"
Expand Down
6 changes: 1 addition & 5 deletions public/stylesheets/money.css
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,6 @@ td.number, th.number {
white-space: nowrap;
}

td.current_balance, th.current_balance {
color: #999;
}

span.real_balance {
font-size: 80%;
color: #999;
Expand All @@ -281,7 +277,7 @@ span.check {
}

.negative {
color: red;
color: red !important;
}

.critical {
Expand Down

0 comments on commit c6f6dd1

Please sign in to comment.