title: flash[:notice] not working when using AJAX in Rails
body: <p>I've tried different variants of make flash[:notice] working without reload.
  <p>Stackoverflow gave me this - <a href="https://stackoverflow.com/questions/366311/how-do-you-handle-rails-flash-with-ajax-requests">How do you handle Rail&#39;s flash with Ajax requests?</a>, but I can't find solution, that worked for me.
  <p>For example, added to my controller:</p>
  
  <pre><code>def create
    @entry = Entry.new(params[:entry])
    respond_to do |format|
    if @entry.save
      format.html { redirect_to @entry, notice: 'Entry was successfully created.' }
      format.js {
    flash.now[:notice] = 'Website was successfully created.'
   render action: 'create'
  }
    else
      format.html { render action: "new" }
      format.js { render action: "new" }
    end
    end
  end
  </code></pre>
  
  <p><b>create.js</b></p>
  
  <pre><code>   $('&lt;%= j render @website %&gt;').appendTo('#websites').hide().fadeIn();
    $(".alert").html("&lt;%= escape_javascript(flash[:notice]) %&gt;"); $(".alert").show(300);
    $("#new_website")[0].reset();
  </code></pre>
  
  <p>but it didn't work.</p>
  
  <p>Can someone tell me understandable full solution, that worked for him ?</p>