title: access params hash in controller
body: <p>I have a link </p>
  
  <pre><code>&lt;%= link_to 'Add link', new_link_path(:link =&gt; {:item1_id =&gt; @item.id}) %&gt;
  </code></pre>
  
  <p>passing to </p>
  
  <pre><code>def new
   @link = Link.new(params[:link])
   @items = Item.all
  </code></pre>
  
  <p>form is</p>
  
  <pre><code>&lt;%= form_for(@link) do |f| %&gt;
  &lt;%= f.hidden_field :item1_id %&gt;
  &lt;%= f.collection_select :item2_id , Item.all , :id , :name %&gt;
  </code></pre>
  
  <p>So I want to access like the image linked to the item1_id item. How do I access it?
  i tried</p>
  
  <pre><code>@item1 = Item.find_by_id(params[:link])
  </code></pre>
  
  <p>and </p>
  
  <pre><code>@item1 = Item.find_by_id(params[:item_id])
  </code></pre>
  
  <p>but I don't know what is right.</p>