2011-09-24 32 views

回答

2

只是做:

@posts = Post.all(:order => 'created_at desc', :limit => 20) 
respond_to do |format| 
    format.json 
end