title: Rails flash messages doesn't show
body: <p>I'm out... 3 hours and still nothing. I made before_filter for my app in application_controller.rb:</p>
  
  <pre><code>def fill_profile
  
  unless current_user.profile.state_id.present?
    flash[:add_state] = 'add_state'
    return respond_to do |format|
      format.html { redirect_to edit_profile_path(current_user.profile) }
    end
  end
  end
  </code></pre>
  
  <p>And now, assets_controller.rb:</p>
  
  <pre><code>class AssetsController &lt; ApplicationController
  
    before_filter :fill_profile
  
  end
  </code></pre>
  
  <p>index action in assets_controller is empty. I press link:</p>
  
  <pre><code>&lt;%= link_to 'abc', assets_path %&gt;
  </code></pre>
  
  <p>and nothing... there is no flash message. For every other controller this before_filter works, only for assets_controller doesn't. Can somebody help? </p>
  
  <p>There is no redirect except this one in before_filter. When i put only flash message in before_filter without redirect_to - it works even for assets_controller. </p>
  
  <p>i have also exacly that same link for messages:</p>
  
  <pre><code>&lt;%= link_to 'def', messages_path %&gt;
  </code></pre>
  
  <p>and exacly that same empty messages_controller.rb with only before_filter - AND IT WORK!</p>
  
  <p>View for flash messages:</p>
  
  <pre><code>&lt;div id="flash_messages"&gt;
    &lt;% flash.each do |key, value| %&gt;
      &lt;%= render :partial =&gt; 'shared/flash_element', :locals =&gt; { :key =&gt; key.to_s.downcase, :value =&gt; value } %&gt;
     &lt;% end %&gt;
   &lt;/div&gt;
  </code></pre>