Skip to content

Commit

Permalink
Fix amount_to_s for booking templates showing % when absolute.
Browse files Browse the repository at this point in the history
  • Loading branch information
huerlisi committed Apr 18, 2011
1 parent df0288d commit a6e5d48
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion app/helpers/booking_template_helper.rb
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ def amount_relations_as_collection
end end


def amount_to_s(booking_template) def amount_to_s(booking_template)
if booking_template.amount_relates_to if booking_template.amount_relates_to.present?
return "%.2f%%" % (booking_template.amount.to_f * 100) return "%.2f%%" % (booking_template.amount.to_f * 100)
else else
return currency_fmt(booking_template.amount) return currency_fmt(booking_template.amount)
Expand Down
1 change: 0 additions & 1 deletion app/views/booking_templates/_booking_template.html.haml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -14,4 +14,3 @@
= list_link_for(:edit, booking_template) = list_link_for(:edit, booking_template)
= list_link_for(:delete, booking_template) = list_link_for(:delete, booking_template)
=# link_to image_tag('16x16/copy.png', :title => 'Copy'), copy_booking_template_path(booking_template), :remote => true =# link_to image_tag('16x16/copy.png', :title => 'Copy'), copy_booking_template_path(booking_template), :remote => true

Original file line number Original file line Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@
%td.action-links %td.action-links
= list_link_for(:edit, charge_booking_template) = list_link_for(:edit, charge_booking_template)
= list_link_for(:delete, charge_booking_template) = list_link_for(:delete, charge_booking_template)

0 comments on commit a6e5d48

Please sign in to comment.