yeah i tried it,

but i am not able to get the output.


can u help me
i am attaching the controller file with this.


class SearchController < ApplicationController
def search
searchvalue=params[:searchtextfield]


@nejmvalue=NEJM.find(:all, :conditions=> ["keywords like 
?",'%'+searchvalue+'%'],:order =>'author ASC')


render(:action =>'search')
end

def alt_search

end

end

Erol Fornoles wrote:
> On Oct 9, 5:14�pm, Sreejith Padmanabhan <[EMAIL PROTECTED]
> s.net> wrote:
>> offset = (page - 1) * items_per_page
>> @nejmvalue = NEJM.find_by_sql(@queryvalue,items_per_page, offset)
>> app/controllers/search_controller.rb:13:in `search'
>> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in
>> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/query_cache.rb:8:in
>> `process'
>> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:120:in
>> `process_client'
>> c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/lib/mongrel.rb:285:in
>> `each'
>> `load'
>> `require'
>> c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.1.0/lib/active_support/dependencies.rb:492:in
>> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/benchmarking.rb:68:in
>> c:/ruby/lib/ruby/gems/1.8/gems/activerecord-2.1.0/lib/active_record/query_cache.rb:8:in
>> `process'
>> c:/ruby/lib/ruby/gems/1.8/gems/actionpack-2.1.0/lib/action_controller/dispatcher.rb:120:in
>> `process_client'
>> c:/ruby/lib/ruby/gems/1.8/gems/mongrel-1.1.2-x86-mswin32/lib/mongrel.rb:285:in
>> `each'
>> `load'
>> `require'
>> Request
>> :csrf_id: 0e527cd89ddc3a6d7072d8be459cd846
>> Posted viahttp://www.ruby-forum.com/.
> Have you tried using the will_paginate plugin instead?
> 
> http://github.com/mislav/will_paginate/tree/master

-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to