Storitel,

I did start with a simple way like yours, but it didn't work for me,
so I google around
& came up to all this complexities. I think the problem is Hobo has
too much "magic",
plus the lack of DRYML doc add up the learning curve.
(I know where to look for the source, but my skills is not up to par
to decode those cryptic dryml yet :-( )

anyways, thanks for sharing.

--
  munkean

On 8月15日, 上午3時56分, storitel <[email protected]> wrote:
> 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