i have table-plus paginating fine, with search. i think this works by
default, without the need to do anythng special.

presumably you have the will_paginate gem installed?

for example the following dryml works for me - and search is still
available....

<index-page>
  <content: replace>
       <table-plus fields="this, phone, town">
      </table-plus>
  </content>
</index-page>

there's nothing special in my controller... just

      hobo_index Company.apply_scopes(:search   =>
[params[:search], :name],
                                    :order_by =>
parse_sort_param(:name),
                                    :user_is => params[:user])


On 14 Aug, 17:49, munkean <[email protected]> wrote:
> hi,
>
> I implemented a normal "list view" & an alternative "table view" for
> an index page,
> but when the table grow it doesn't do any paginating. I experimenting
>
> index_action :table_view, :per_page => 10
>
> the table show up with paginating but lost the search function :-(
> adding the .apply_scopes() to hobo_index gained back the search,
> but the "normal" index listing pages were not longer paginate.
>
> then I tried combined both apply_scopes & paginate:
>
>   def index
>     hobo_index Purchase.apply_scopes(:search =>
> [params[:search],:name],:order_by =>
> parse_sort_param(:name)).paginate(:per_page => 10, :page =>
> params[:page])
>   end
>
> it gives me an method undefined "scope" error.
>
> look like the search & paginate can not co-exist together, any way to
> let them
> play nice with each other?
>
> --
>   munkean

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en.

Reply via email to