title: Argument error in collect object Rails 3
body: <p>Guys I'm using a select() tag in .html.erb file as follows</p>
  
  <pre><code>&lt;%= select(:hfi_id, b.beneficiaryloans.collect { |h| [User.find(h.hfi_id).firstname, h.hfi_id] }) %&gt;
  </code></pre>
  
  <p>what's wrong in this statement? actually it is giving an error called</p>
  
  <pre><code> wrong number of arguments (2 for 3) - error for above line
  </code></pre>
  
  <p>But same thing I executed in irb console, it's working fine like</p>
  
  <pre><code>irb(main):012:0&gt; me=Beneficiary.find(1)
  =&gt; #&lt;Beneficiary id: 1, firstname: "Mohan", lastname: "Bairwa", address: "1399 m.k.b jagatpira", age: 24, sex: "Male", total_members: 1, cso_id: 123, project_id: 17, remarks: nil, status_id: 4, created_at: "2011-11-07 09:39:24", updated_at: "2011-11-07 09:55:07"&gt;
  
  irb(main):018:0&gt; me.beneficiaryloans.collect {|h|User.find(h.hfi_id).firstname,h.hfi_id]}
  =&gt; [["Gruh", 117]]
  </code></pre>
  
  <p>using irb console I'm getting correct result </p>
  
  <pre><code>    =&gt; [["Gruh", 117]]
  </code></pre>
  
  <p>but when I put it in .html.erb file, It's giving argument error. How to solve this?</p>