Ruby
China
Rails
mongoid 怎么取后几条数据?
Topics
招聘
Wiki
酷站
Gems
Sign Up
Sign In
Rails
mongoid 怎么取后几条数据?
hlcfan
·
March 30, 2012
· Last by
yangyanhao
replied at
March 30, 2012
· 1641 hits
我发现我用
limit
取出来的数据总是没有最后的几条。诧异... 最后就像是 [-20..-1] 效果。
yangyanhao
#0
March 30, 2012
你可以 Model.desc(...).limit(n).reverse 吧?
You need to
Sign in
before reply, if you don't have an account, please
Sign up
first.
Alex Shi
@hlcfan
huh
西安
Total
1
replies
New Reply comming, click to load.