title: Rails controller design help needed
body: <p>I have this scenario.</p>
  
  <p>My Models</p>
  
  <pre><code>class User
  end
  
  class Student 
    has_many :daily_records
  end
  
  class DailyRecords
    belongs_to :student
  end
  </code></pre>
  
  <h2>What i am trying to archive</h2>
  
  <ol>
  <li>i want to create a form on the student's show page to enter data for his daily records.</li>
  <li>i want the form to have the id for the user entering the data. 
  How can i design the controller for this scenario.</li>
  </ol>
  
  <h2>What i have done so far.</h2>
  
  <ol>
  <li>i added the user model using Devise</li>
  <li>i have scaffold the two model (student, daily_record) and added the associations as seen above. </li>
  </ol>
  
  <p>I know i need to work on the show action of the student controller to make this work. I need help. just new to rails
  thanks</p>
  
  <pre><code>class StudentsController &lt; ApplicationController
  
    before_action :set_student
    def show
      &lt;--help code---&gt;
    end
  ........
  </code></pre>