On 23.02.2012, at 23:15, Roger Patrick wrote: >> > def index > @games = games_relation.paginate(:per_page => 4, :page => > params[:page]).search(params[:search]) > end > > in my game.rb file I will have the following: > > games_relation = case params[:console].present? > when true then Game.where(:console => params[:console]) > else Game > end > > please correct me if I am wrong. Thanks for your help.
No no no, that was all for index action: def index games_relation = case params[:console].present? when true then Game.where(:console => params[:console]) else Game end @games = games_relation.paginate(:per_page => 4, :page => params[:page]).search(params[:search]) end -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.