The @automaton variable appears to be empty. Did you forget to pass the collection object for will_

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.

On Jun 27, 5:57 am, sadeesh kumar [email protected] 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