I am working with Railsspace social networking book. I stuck in the
problem when i am doing paginate for the search result. It gives the
following error.
NoMethodError in CommunityController#index
undefined method `paginate' for #<CommunityController:0x57436f0>
My Controller Index page coding is below
def index
@title = "Community"
@letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ".split("")
if params[:id]
@initial = params[:id]
@pages, specs = paginate(:specs,
:conditions => ["last_name LIKE ?", @initial+"%"],
:order => "last_name, first_name")
@users = specs.collect { |spec| spec.user }
end
end
Please help me out.
Any help is appreciable.
Thanks
Amir
--
Posted via
http://www.ruby-forum.com/.