title: How to call a method and send new parameters in RoR?
body: <p>Let's say I have methodA</p>
  
  <pre><code>  def methodA
      note = Note.find(params[:id])
      note.link = params[:link]
      note.linktype = params[:linktype]
      note.save
      redirect_to(notes_url)
    end
  </code></pre>
  
  <p>When I call this method from a view like this, it works fine</p>
  
  <pre><code>&lt;%= link_to image_tag(w.link, :border =&gt;0), methodA_path(:linktype =&gt; w.linktype, :link =&gt; w.link, :id =&gt; @note.id) %&gt;
  </code></pre>
  
  <p>But, if I call the method from another method in the same controller like this:</p>
  
  <pre><code>def methodB
     ...
     methodA(:id =&gt; params[:id], :link =&gt; link, :linktype =&gt; "image")
  end
  </code></pre>
  
  <p>I get this error:</p>
  
  <pre><code>wrong number of arguments (1 for 0)
  </code></pre>
  
  <p>The parameters that methodA is getting are still the same parameters that methodB got, not the ones that I'm sending from methodB. How do I get around this problem? Thank for reading.</p>