haha

Raecoo posted @ 2008年5月26日 23:16 in 未分类 , 1110 阅读

 

class Topic < ActiveRecord::Base def self.find_latest(time = nil) r = %w( hour day week month year ) if r.include?(time) self.find :all, :conditions => ['created_at > ?', 1.send(time).ago] else self.find :all end end end

登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter