Reputation: 654
I'm using responders gem, and I want to show validation errors when form is not valid. In my controller I created the interpolation_action
def interpolation_options
{ resource_errors: @project_user.errors.full_messages.join(', ') }
end
and my reponders translation file has a proper key:
project_users:
create:
notice: "Member has been added"
alert: "%{resource_errors}"
It works well and I can see validation error message, the problem is that apostrophe is changed to ASCII code.
Upvotes: 1
Views: 279
Reputation: 154
Does Responder still require you to add the flash in your html? In that case you could do something like <%= flash[:alert].html_safe %>
to enforce html on your flash message, even for the escaped characters.
Upvotes: 2