views:

44

answers:

1

Does anyone have the same problem or a working solution? I get always this error message, here are model, controller and view code

class Profile < ActiveRecord::Base
  cattr_reader :per_page
    @@per_page = 10
end

def index
   @search = Profile.search(params[:search])
    @profiles = @search.paginate(:page => params[:page])
  end

<%= will_paginate order @profiles , :by => :created_at, :as => "name" %>

please help, thanks in advance

A: 
John Topley
oh, thanks for the quick answer.I want to use the order method from searchlogic in the view.How can I do that in combination with will_paginate ?
tabaluga
@tabaluga See my edited answer.
John Topley
Hey, I got it! Thanks for pointing me in the right direction!<%= will_paginate @profiles %><%= order @search, :by => :created_at %>Upps, didn't press the refresh button. Thankyou, thankyou, thankyou
tabaluga
You're welcome, I'm glad it worked! Please accept my answer if you're happy with it by clicking the tick graphic to the left.
John Topley
4 3 2 1 Done :)
tabaluga