title: ActionView::Template:Error(undefined method 'first_name' for nil:NilClass)
body: <p>My app seems to randomly be throwing an error when users are trying to load grid data into the form:</p>
  
  <pre><code>   ActionView::Template::Error (undefined method `first_name' for nil:NilClass):
  3:          t = @conts
  4:                          xml.tag!("row",{ "id" =&gt; t.id }) do
  5:
  6:                                  xml.tag!("cell", t.first_name)
  7:                                  xml.tag!("cell", t.last_name)
  8:                          xml.tag!("cell", t.email)
  9:                                  xml.tag!("cell", t.phone_1)
  </code></pre>
  
  <p>And following is the controller file</p>
  
  <pre><code> def compdata
         @conts = Continfo.find_by_id(params[:id])
      end
  </code></pre>
  
  <p>Correspondence compdata RXML file</p>
  
  <pre><code>     xml.instruct! :xml, :version=&gt;"1.0" 
         xml.tag!("rows") do
       t = @conts
          xml.tag!("row",{ "id" =&gt; t.id }) do
  
              xml.tag!("cell", t.first_name)
              xml.tag!("cell", t.last_name)
              xml.tag!("cell", t.email)
              xml.tag!("cell", t.phone_1)
              xml.tag!("cell", t.phone_2)
              xml.tag!("cell", t.homepage)
              xml.tag!("cell", t.skype)
      end
  end
  </code></pre>