# The @automaton variable appears to be empty. Did you forget to pass the collection object for will\_

**URL:** <https://www.ruby-forum.com/t/the-automaton-variable-appears-to-be-empty-did-you-forget-to-pass-the-collection-object-for-will/141582>\
**Category:** Rails\
**Created:** [June 27, 2008, 9:43am UTC](https://www.ruby-forum.com/t/the-automaton-variable-appears-to-be-empty-did-you-forget-to-pass-the-collection-object-for-will/141582 "2008-06-27T09:43:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sadeesh\_kumar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/439d5e/32.png) [@sadeesh\_kumar](https://www.ruby-forum.com/u/sadeesh_kumar)\
**Post date:** [June 27, 2008, 9:43am UTC](https://www.ruby-forum.com/t/the-automaton-variable-appears-to-be-empty-did-you-forget-to-pass-the-collection-object-for-will/141582/1 "2008-06-27T09:43:44Z")

</div>

Hi,  
I Got will\_paginate as gem and added required things is config/  
environment.rb.

My controller code,  
------\>8--------  
@triedmails = Triedmail.paginate :all, :page =\> params[:page]  
------8\<-------  
My view code,  
------\>8--------  
\<%= will\_paginate @triedmails%\>  
------8\<-------

## It is throwing,

The @automaton variable appears to be empty. Did you forget to pass  
the collection object for will\_paginate?

Extracted source (around line #1):

## 1: \<%= will\_paginate @triedmails%\>

I never pass a variable named @automaton. But I don’t know where it is  
throwing like this. But my controller name is automatoncontroler.

Could any one explain me?

-Sadeesh.

---

<div class="post-metadata">

**Author:** ![sadeesh\_kumar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/439d5e/32.png) [@sadeesh\_kumar](https://www.ruby-forum.com/u/sadeesh_kumar)\
**Post date:** [June 27, 2008, 10:21am UTC](https://www.ruby-forum.com/t/the-automaton-variable-appears-to-be-empty-did-you-forget-to-pass-the-collection-object-for-will/141582/2 "2008-06-27T10:21:48Z")

</div>

On Jun 27, 5:57 am, sadeesh kumar [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> \<%= will\_paginate @triedmails%\>  
> ------8\<-------
> 
> ## It is throwing,
> 
> The @automaton variable appears to be empty. Did you forget to pass  
> the collection object for will\_paginate?

Looking at the code, this is what you’d get if @triedmails was nil

Fred
