$("#messages .text-alert").remove(); <% if defined?(message) %> $("#messages").append("<%= j(cell("decidim/user_conversation", user).message(message)).html_safe %>"); $(".new_message textarea#message_body").val(""); <% else %> $("#messages").append("

<%= j(error) %>

"); <% end %>