Reputation: 10207
In my Ruby on Rails application I have this:
module Constants
CURRENCIES = {
"EUR" => "€",
"USD" => "$",
"GBP" => "£"
}
end
This works but is causing me some trouble because the HTML-entities can't be escaped in certain situations, e.g. when generating .csv
or .pdf
files.
It would be better to store the currency symbols like this:
module Constants
CURRENCIES = {
"EUR" => "€",
"USD" => "$",
"GBP" => "£"
}
end
However, when I do that I get this nasty error from Rails: We're sorry, but something went wrong.
What am I missing here?
Thanks for any help.
Upvotes: 0
Views: 357