I'm having some problems having html tags correctly loaded in my Rails 3.2 app, and have no clue why. I managed to get it working for one flash message, but I am not managing to do it with a confirmation message.
Any ideas ?
My pt.yml file extract :
buttons:
accept_terms: "Aceito os termos e condições"
save: "Gravar"
delete: "Apagar"
add_new_receipt: "+"
add_receipt_label: "Clique para adicionar novo recibo"
download_all_html: "Tem a certeza que deseja descarregar todos os ficheiros correspondentes à pesquisa? <br />
Esta operação pode demorar algum tempo, dependendo do número de ficheiros e da sua ligação à Internet "
my view code:
<%= link_to (t :download_all, scope: "pages.home.customers"), user_download_all_path(user_id:current_user.id, is_retailer: params[:controller]=='suppliers' ? true : false), method: :post, class: "btn btn-primary", confirm: t(:download_all_html, scope: "buttons") %>
In the end, My confirmation message shows the <br />
as is....
I believe I am following rails guidelines here, so any help would be appreciated to figure this one out.
Edit
I had already tried html_safe.
I have one other example that is working :
tags:
error_message_html: "O número %{message} ou não existe ou já foi mapeado.<br />
Por favor verifique que o número corresponde à empresa seleccionada "
and I invoke it inside a controller :
flash[:error] = t :error_message_html, scope: "forms.tags", message: params[:tag][:number]
within my message... I'm running on a development windows machine, if that may influence somehow – MrWater Apr 21 '13 at 00:20