Thanks a lot, Ben! Got it working by ordering the one in descending and the 
other in ascending order:

  def prev
>     Post.first(:created_on.lt => @post_date, :order => [:created_on.desc])
>   end
>   def nexts
>     Post.first(:created_on.gt => @post_date, :order => [:created_on.asc])
>   end


Thanks guys,
Alex 

-- 
You received this message because you are subscribed to the Google Groups 
"DataMapper" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/datamapper/-/4yjv3-AV6noJ.
To post to this group, send email to datamapper@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