This is great, but when I try to use it in my view, it get HTML-escaped output. 
Clearly I'm doing something wrong...is this meant to be used only in the 
controller?

<%= Article.page.pager.to_html('/articles') %>

&lt;ul class=&quot;pager&quot;&gt;&lt;li class=&quot;page-1 
active&quot;&gt;&lt;a 
href=&quot;/articles?page=1&quot;&gt;1&lt;/a&gt;&lt;/li&gt;



&lt;li class=&quot;page-2&quot;&gt;&lt;a 
href=&quot;/articles?page=2&quot;&gt;2&lt;/a&gt;&lt;/li&gt;


&
lt;li class=&quot;page-3&quot;&gt;&lt;a 
href=&quot;/articles?page=3&quot;&gt;3&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;page-4&quot;&gt;&lt;a 
href=&quot;/articles?page=4&quot;&gt;4&lt;/a&gt;&lt;/li&gt;


&
lt;li class=&quot;page-5&quot;&gt;&lt;a 
href=&quot;/articles?page=5&quot;&gt;5&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;page-6&quot;&gt;&lt;a 
href=&quot;/articles?page=6&quot;&gt;6&lt;/a&gt;&lt;/li&gt;


&
lt;li class=&quot;page-7&quot;&gt;&lt;a 
href=&quot;/articles?page=7&quot;&gt;7&lt;/a&gt;&lt;/li&gt;
&lt;li class=&quot;more&quot;&gt;...&lt;/li&gt;

&
lt;li class=&quot;next jump&quot;&gt;&lt;a 
href=&quot;/articles?page=2&quot;&gt;Next&lt;/a&gt;&lt;/li&gt;

&
lt;li class=&quot;last jump&quot;&gt;&lt;a 
href=&quot;/articles?page=3387&quot;&gt;Last&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;



--
Mark A. Richman, MBA
http://www.markrichman.com
tel: (954) 234-9049
skype: mark_richman

On Nov 15, 2010, at 3:57 PM, Piotr Solnica wrote:

> I believe will_paginate works only with ActiveRecord. You can use dm-
> pager: https://github.com/visionmedia/dm-pagination
> 
> Cheers,
> 
> # solnic
> 
> On Nov 15, 9:04 pm, Mark Richman <markarich...@gmail.com> wrote:
>> Okay I'm sure someone know how to do this. For now, I'm getting
>> "undefined method `paginate'". I added gem "will_paginate", "~>
>> 3.0.pre2" to my Gemfile and ran bundle install already.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "DataMapper" group.
> To post to this group, send email to datamap...@googlegroups.com.
> To unsubscribe from this group, send email to 
> datamapper+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/datamapper?hl=en.
> 

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To post to this group, send email to datamap...@googlegroups.com.
To unsubscribe from this group, send email to 
datamapper+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/datamapper?hl=en.

Reply via email to