Created
August 18, 2015 02:37
-
-
Save mwlang/461ebad1f6445c5a2e33 to your computer and use it in GitHub Desktop.
Need newlines "\n" in Ruby? No problem, here's a great way *not* to generate them!
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 formated_item_details_for_mail(mail_to,host_name,use_non_vat_price = false) | |
ascii_formated_item_details = %{#{self.printed_title}} + %{ | |
} | |
ascii_formated_item_details += %{#{self.publication_year}} + %{ | |
} | |
ascii_formated_item_details += %{#{poly_formatted_price_controller_or_model(self.get_basis_price(use_non_vat_price))}} +%{ | |
} | |
ascii_formated_item_details += %{http://#{host_name}#{Page.find(SystemSettings[:default_item_viewer_page_id]).absolute_url}/#{self.id}} | |
end | |
return ascii_formated_item_details | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment