Cool thanks, and I assume I can go -
params[:page, :order]  to make the order a variable as well?

On Oct 16, 1:53 am, Jonathan Stott <[email protected]> wrote:
> This is actually a sinatra question.  But it's a very simple answer so:
>
> page=1
>
> will be available at
>
> params['page']
>
> In both your route handler and your view.
>
> Regards
> Jon
>
> On 16 October 2010 05:56, tspore <[email protected]> wrote:
>
>
>
> > I would like to use this gem in my sinatra app, and it works except I
> > don't know how in my class to get the updated url to update the page
> > result for example if the url is :
> > /items?page=3
>
> > How do I get the class to read
> > @items = Item.page(3*, :per_page =>10)
>
> > or
> > /items?page=1
> > @items = Item.page(1*, :per_page =>10)
>
> > As well in my view I have -
> > <%= Item.page(1*).pager.to_html("/items") %>
>
> > So I need the number* to be dynamically updated, but I don't know how
> > to do that in the route or view.... Thanks!

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

Reply via email to