Created
March 21, 2012 11:17
-
-
Save jumski/2146289 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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