title: Why i don't seen flash alert message on devise
body: <p>After I override <code>SessionsController</code> I tried to block not real users but after a page refresh, I don't seen the flash alert message.</p>
  <p>this code on <strong>session_controller.rb</strong></p>
  <pre><code>  #skip_before_action :verify_signed_out_user
    #before_action :configure_sign_in_params, only: [:create]
  
    # GET /resource/sign_in
    def new
      super
    end
  
    # POST /resource/sign_in
    def create
      # super do |user|
      #   byebug
      # end
      self.resource = warden.authenticate!(auth_options)
      if !real_user()
        signed_out = (Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name))
        flash[:alert] = &quot;Invalid user&quot;
        redirect_to '/'
      end
    end
  end
  </code></pre>
  <p>and this on <strong>new.html.erb</strong></p>
  <pre><code>&lt;ul class=&quot;mtn&quot;&gt;
    &lt;%- flash.each do |name, msg| -%&gt;
     &lt;%- if name == &quot;alert&quot; %&gt;
       &lt;li&gt;&lt;%= msg %&gt;&lt;/li&gt;
     &lt;% end %&gt;
    &lt;% end %&gt;
  &lt;/ul&gt;
  </code></pre>
  <p>after redirect <strong>flash[:alert]</strong> is nil.</p>