From 0ffda6bbf426231f159a4cbbb4f67e83480529bf Mon Sep 17 00:00:00 2001 From: Coleman Date: Fri, 17 Oct 2008 03:53:13 -0500 Subject: [PATCH] use variable for helper generation --- app/controllers/votes.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/votes.rb b/app/controllers/votes.rb index 6f0d1b0..1ad2891 100644 --- a/app/controllers/votes.rb +++ b/app/controllers/votes.rb @@ -4,7 +4,7 @@ class Votes < Application def show @page = params[:page].to_i per_page = 4 - @votes = @user.votes.find :all, :limit => 4, :offset => (@page * 4) + @votes = @user.votes.find :all, :limit => per_page, :offset => (@page * per_page) @page_count = (@user.votes.size.to_f / per_page.to_f).ceil if @votes.empty? flash[:notice] = 'You need to vote, first'