Rails 4 - Strong Parameters - associated attribute
<p>I have a model called Trl and a model called Project.  The associations are:</p>

<p>Project</p>

<pre><code>belongs_to :Trl
</code></pre>

<p>Trl</p>

<pre><code>has_many :projects
</code></pre>

<p>In my projects form, I ask users to select a Trl, the projects form has:</p>

<pre><code>&lt;%= render partial: 'trls/project', locals: { f: f } %&gt;  
</code></pre>

<p>That partial has:</p>

<pre><code>&lt;%= f.input :trl, label: false do %&gt;
  &lt;%= f.select :trl, Trl.all.map { |t| [t.title, t.id] }, 
                            include_blank: false, 
                            prompt: 'Select one' %&gt;
</code></pre>

<p>When I save all this and try to use it, I get an error that says: </p>

<pre><code>undefined method `title' for nil:NilClass
</code></pre>

<p>I'm not sure about whether I need to include trl_attribute [:title] in my projects controller strong params. The user filling in the form can't create a title, they can just pick one from a list that has already been made.</p>

<p>Does this context need to be included in strong params?</p>