# Passing Array

**URL:** <https://www.ruby-forum.com/t/passing-array/180267>\
**Category:** Rails\
**Created:** [December 16, 2009, 6:29am UTC](https://www.ruby-forum.com/t/passing-array/180267 "2009-12-16T06:29:43Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![newb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/2acd7d/32.png) [@newb](https://www.ruby-forum.com/u/newb)\
**Post date:** [December 16, 2009, 6:29am UTC](https://www.ruby-forum.com/t/passing-array/180267/1 "2009-12-16T06:29:43Z")

</div>

I want to pass array of items to controller method

@users = User.find(:all)  
\<%=link\_to “Generete”,:action =\> “generate”,:users =\> @users%\>  
but the above code is not working…  
how i should do it…  
any helps pls

---

<div class="post-metadata">

**Author:** ![newb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/2acd7d/32.png) [@newb](https://www.ruby-forum.com/u/newb)\
**Post date:** [December 16, 2009, 10:15am UTC](https://www.ruby-forum.com/t/passing-array/180267/2 "2009-12-16T10:15:36Z")

</div>

Newb N. wrote:

> I want to pass array of items to controller method
> 
> @users = User.find(:all)  
> \<%=link\_to “Generete”,:action =\> “generate”,:users =\> @users%\>  
> but the above code is not working…  
> how i should do it…  
> any helps pls

What are you trying to do?

---

<div class="post-metadata">

**Author:** ![newb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/2acd7d/32.png) [@newb](https://www.ruby-forum.com/u/newb)\
**Post date:** [December 16, 2009, 10:24am UTC](https://www.ruby-forum.com/t/passing-array/180267/3 "2009-12-16T10:24:36Z")

</div>

Pale H. wrote:

> Newb N. wrote:
> 
> > I want to pass array of items to controller method
> > 
> > @users = User.find(:all)  
> > \<%=link\_to “Generete”,:action =\> “generate”,:users =\> @users%\>  
> > but the above code is not working…  
> > how i should do it…  
> > any helps pls
> 
> What are you trying to do?

i m trying to create report using excel

---

<div class="post-metadata">

**Author:** ![newb](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/2acd7d/32.png) [@newb](https://www.ruby-forum.com/u/newb)\
**Post date:** [December 16, 2009, 12:52pm UTC](https://www.ruby-forum.com/t/passing-array/180267/4 "2009-12-16T12:52:27Z")

</div>

Newb N. wrote:

> Pale H. wrote:
> 
> > Newb N. wrote:
> > 
> > > I want to pass array of items to controller method
> > > 
> > > @users = User.find(:all)  
> > > \<%=link\_to “Generete”,:action =\> “generate”,:users =\> @users%\>  
> > > but the above code is not working…  
> > > how i should do it…  
> > > any helps pls
> > 
> > What are you trying to do?
> 
> i m trying to create report using excel

I meant, what’s the application supposed to actually display?
