title: Rails nested resource parameters
body: <p>I am newish to Ruby on Rails, using version 4.1 in a project.</p>
  
  <p>I am a bit confused about the way the nested resources are working in rails. Perhaps someone can help. </p>
  
  <p>I am building a tasking system as a learning project.</p>
  
  <p>I have websites that have tasks that belong to them. When viewing tasks, I can do:</p>
  
  <pre><code>resources :websites do 
    resources :tasks
  end
  </code></pre>
  
  <p>And a link will take me to my task just fine, with a url like <a href="http://myapp.com/websites/2/tasks/3" rel="noreferrer">http://myapp.com/websites/2/tasks/3</a></p>
  
  <pre><code>&lt;%= link_to 'Show', website_task_path(website,task) %&gt;
  </code></pre>
  
  <p>What I noticed though, is that I can change the website id in the url to anything - <a href="http://myapp.com/websites/what-the-hell-is-going-on-here/tasks/1" rel="noreferrer">http://myapp.com/websites/what-the-hell-is-going-on-here/tasks/1</a> - works just the same as the other link. Or I can access that task with a different website id in the url as well.</p>
  
  <p>So the question is, is Rails supposed to do anything with that piece of information by default? Is it up to me if I want to make sure that you are accessing the task with the right parent resource in the parameters?</p>