I''m not sure if this is what u wanted...
_posts = Post.find(:all,
:conditions => [ ''(title) OR (body) LIKE
?'', ''%''+
params[:query] + ''%''],
:order => ''end_date'')
//or Post.count_by_sql
@post_pages = Paginator.new self, _posts.size, 10,
@params[''page'']
@posts = Post.find
:all,
:conditions => [ ''(title) OR (body) LIKE ?'',
''%''+
params[:query] + ''%''],
:order => ''end_date''
:limit => @post_pages.items_per_page,
:offset => @post_pages.current.offset
--
Cheers,
ioana k&a
http://boulangerie.wordpress.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060615/bf1df02b/attachment.html