title: not able to access data from hierarchy one to many relation in rails
body: <p><strong>Project has many sites</strong> and
  <strong>Each site has many remarks</strong></p>
  <p>now in <code>project#show</code>, <code>remarks</code> attribute are not accessible by each <code>site</code></p>
  <p>here is my code -</p>
  <p>show.html.erb</p>
  <pre><code>  &lt;% @projects.sites.each do |site| %&gt;
                &lt;% site.remarks.each do |remark| %&gt;
                  &lt;% if remark.status == false %&gt;
                    &lt;td class=&quot;rejected fi-x&quot;&gt;&lt;%= ' Rejected' %&gt;&lt;/td&gt;
                  &lt;% elsif remark.status == true %&gt;
                    &lt;td class=&quot;approved fi-check&quot;&gt;&lt;%= &quot; Approved&quot; %&gt;&lt;/td&gt;
  &lt;% end %&gt;
  </code></pre>
  <p>projects_controller.rb</p>
  <pre><code>@projects = current_user.projects
  </code></pre>
  <p>remark.rb(model)</p>
  <pre><code>belongs_to :site
  </code></pre>
  <p>site.rb (model)</p>
  <pre><code>  has_many :remarks, dependent: :destroy
  </code></pre>
  <p>routes.rb</p>
  <pre><code>resources :sites do
   resources :remarks
  end 
  resources :projects
  </code></pre>