title: How to pass parameters from controller in ror?
body: <p>I want to show two columns from employee attendance table which is day and present , but unable to show -</p>
  
  <p>Here is my show page - </p>
  
  <pre><code>&lt;div class="box box-default"&gt;
  &lt;div class="box-header with-border"&gt;
  &lt;h3 class="box-title"&gt;Holiday Setup&lt;/h3&gt;
  &lt;/div&gt;&lt;!-- /.box-header --&gt;
  &lt;div class="box-body"&gt;
  &lt;table id="example1" class="table table-bordered table-hover table-condensed"&gt;
    &lt;thead&gt;
      &lt;tr&gt;
        &lt;th&gt;Day&lt;/th&gt;  
        &lt;th&gt;Present&lt;/th&gt;
      &lt;/tr&gt;
    &lt;/thead&gt;
    &lt;tbody&gt;
      &lt;% @employee_attendances.each do |employee_attendance| %&gt;
          &lt;tr&gt;
            &lt;td&gt;&lt;%= employee_attendance.day %&gt;&lt;/td&gt;
            &lt;td&gt;&lt;%= employee_attendance.present %&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;% end %&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;/div&gt;
  &lt;/div&gt;   
  </code></pre>
  
  <p>Controller code -</p>
  
  <pre><code>def holiday_setup
    @day = params[:day]
    @employee_attendances = EmployeeAttendance.where(present: 'H',day: @day)
  end
  </code></pre>