if ($("#profile_notice").length == 0){ $("#profile_form").prepend('
'); } <% if @profile.valid? %> $("#profile_notice").html("<%= t('profile.update.success')%>"); $("#profile_notice").removeClass('error'); $("#profile_notice").addClass('success'); <% else %> $("#profile_notice").html("