Has and Belongs to Many error - *_development.hunts_tasks' doesn't exist:
So I'm working on a project where there are tasks that make up a scavenger hunt. So when a user clicks on a particular hunt, I'd like the show.html.erb file to show the hunt as well as the tasks associated with that hunt. Both models (Hunt.rb and Task.rb) have "has_and_belongs_to_many" relationships with one another. My controller originally had this code, but it showed every task in the database, instead of just the tasks associated with a particular hunt. def show @hunt = Hunt.find(params[:id]) @title = @hunt.name @tasks = Task.paginate(:page => params[:page]) end So I tried this. def show