title: Error on rendering show action
body: <p>I am trying to render show action by passing parameters, but the show page is not being rendered when there are no users signed in. This is my controller:</p>
  
  <pre><code>class QrCodesController &lt; ApplicationController
  
    def show
      @user = User.find_by_qr(params[:id])
      if @user.nil?
          redirect_to root_path
      end
    end
  end
  </code></pre>
  
  <p>and this is my view:</p>
  
  <pre><code>This is the qr-code page of &lt;%= @user.fname %&gt; &lt;%= @user.lname%&gt;
  </code></pre>
  
  <p>However, the show page is perfectly rendered when any user is signed in.</p>
  
  <p>The rails server also shows perfectly rendered show action:</p>
  
  <pre><code>Started GET "/qr_codes/9M9JZLiemrNdS_g90mZ14w" for 127.0.0.1 at 2013-08-02 18:29:55 +0545
  Processing by QrCodesController#show as HTML
    Parameters: {"id"=&gt;"9M9JZLiemrNdS_g90mZ14w"}
    User Load (0.3ms)  SELECT "users".* FROM "users" WHERE "users"."qr" = '9M9JZLiemrNdS_g90mZ14w' LIMIT 1
    Rendered qr_codes/show.html.erb within layouts/application (0.7ms)
    Rendered layouts/_shim.html.erb (0.0ms)
    Web Load (0.3ms)  SELECT "webs".* FROM "webs" WHERE "webs"."id" = 2 LIMIT 1
    Rendered layouts/_header.html.erb (3.2ms)
    Rendered layouts/_footer.html.erb (0.0ms)
  Completed 200 OK in 54ms (Views: 52.4ms | ActiveRecord: 0.5ms)
  </code></pre>
  
  <p>I am using rails 3.2.13, ruby 1.9.3p429 along with devise 3.0.0. The User model was not generated by devise.</p>
  
  <p>Please Help.</p>
  
  <p><strong>EDIT:</strong>
  This is the link that triggers the show action: </p>
  
  <pre><code>http://localhost:3000/qr_codes/9M9JZLiemrNdS_g90mZ14w
  </code></pre>