title: Rails: Pass parameter from view to controller
body: <p>I have the following models in rails :</p>
  
  <pre><code>class Task &lt; ActiveRecord::Base
    attr_accessible :description, :name, :project
    belongs_to :project
  
    validates :name, :presence =&gt; true
  
  end
  
  class Project &lt; ActiveRecord::Base
    attr_accessible :name
    has_many :tasks
  end
  </code></pre>
  
  <p>I have a view that lists the projects available On click on any of the project I want to open up a page that lists all the tasks in the clicked project. Now the question is how do I pass the project id? I also want the project id to be visible in many controllers after that so I think I should use session variables or something like that?</p>