I have the following models in rails :
class Task < ActiveRecord::Base
attr_accessible :description, :name, :project
belongs_to :project
validates :name, :presence => true
end
class Project < ActiveRecord::Base
attr_accessible :name
has_many :tasks
end
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?