What am I missing here? I am using the haml_scaffold generator and the pages work fine with will_paginate. When I start tinkering I end up with this \'total_pages\' error an
If anyone else is having this problem. In my case I did not call the pagination in my controller method last.
Example Before:
@foo = Foo.paginate(:page => params[:page], :per_page => 15)
@foo = Foo.do something
Example After: I called the pagination last within my method since rails reads from top to bottom and it seemed to fix my error.
@foo = Foo.do something
@foo = Foo.paginate(:page => params[:page], :per_page => 15)