title: undefined method , Ruby on rails , not able to read database properly postgresql
body: <pre><code>ActionView::Template::Error (undefined method `experiences' for #&lt;Profile id: 2, name: nil, job_title: nil, total_experience: nil, career_highlights: [], overview: nil, primary_skills: [], secondary_skills: [], user_id: 2, created_at: &quot;2022-01-12 17:40:01.237665000 +0000&quot;, updated_at: &quot;2022-01-12 17:40:01.237665000 +0000&quot;&gt;
  </code></pre>
  <p>error raised here :</p>
  <pre><code>&lt;%= render partial: 'shared/profile/experience', collection: profile.experiences %&gt;
  </code></pre>
  <p>this is my experience.rb</p>
  <pre><code>&lt;%= render 'shared/edit_sub_section' do %&gt;
      &lt;%= experience.text_field :company, value: experience.object.company, placeholder: &quot;Company&quot; %&gt;&lt;br/&gt;
      &lt;%= experience.text_field :position, value: experience.object.position, placeholder: &quot;Position&quot; %&gt;&lt;br/&gt;
      &lt;%= experience.date_field :start, value: experience.object.start, placeholder: &quot;Start date&quot; %&gt;&lt;br/&gt;
      &lt;%= experience.date_field :end, value: experience.object.end, placeholder: &quot;End date&quot; %&gt;&lt;br/&gt;
      &lt;%= experience.text_area :description, value: experience.object.description, placeholder: &quot;Description&quot; %&gt;&lt;br/&gt;
      &lt;%= render 'shared/input/buttons/delete', type: experience %&gt;
  &lt;% end %&gt;
  </code></pre>
  <p>schema.rb contains experiences table
  and foreign keys</p>
  <pre><code>add_foreign_key &quot;educations&quot;, &quot;profiles&quot;
    add_foreign_key &quot;experiences&quot;, &quot;profiles&quot;
    add_foreign_key &quot;profiles&quot;, &quot;users&quot;
    add_foreign_key &quot;projects&quot;, &quot;experiences&quot;
  </code></pre>