title: Simple_form Error - undefined method `model_name' for ActiveRecord::Relation:Class
body: <p>I am trying to add some more conditional logic to my edit action by passing params into a where.</p>
  
  <p>Whenever I use anything other than .find(params[:id], the error undefined method `model_name' for ActiveRecord::Relation:Class</p>
  
  <p>My code is below</p>
  
  <p>Controller:</p>
  
  <pre><code>def edit
     @office = Office.where("id = ? AND company_id = ?", params[:id], @company.id )
  end
  </code></pre>
  
  <p>View:</p>
  
  <pre><code>&lt;%= simple_form_for @office, :url =&gt; settings_office_path, :html =&gt; { :class =&gt; "office_form" } do |f| %&gt;
    &lt;h1&gt;Edit &lt;%= @office.office_name %&gt; Details&lt;/h1&gt;
    &lt;%= render :partial =&gt; 'form', :locals =&gt; { :f =&gt; f } %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>I outputted the class for @office which is ActiveRecord::Relation.  If I just use </p>
  
  <pre><code>@office = Office.find(params[:id])
  </code></pre>
  
  <p>the output is Office.</p>
  
  <p>I think this is the problem but don't know how to fix it. Any ideas?</p>