Skip to content

Instantly share code, notes, and snippets.

@jumski
Created March 21, 2012 11:17
Show Gist options
  • Save jumski/2146289 to your computer and use it in GitHub Desktop.
Save jumski/2146289 to your computer and use it in GitHub Desktop.
def display_booking_prices(booking)
prices.inject('') do |content, row|
content << content_tag :dl, row.inject('') do |row_content, cell|
row_content << case row.index(cell)
when 2
content_tag(:dd, display_money(cell, booking.place.currency, :no_html => true), :class => "price")
when 1
content_tag(:dd, cell, :class => "guests")
when 0
content_tag(:dd, cell, :class => "nights")
end
end
end.html_safe
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment