Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def self.next(current)
- find(:first,:order=>"created_at",:conditions=>["id > ?",current.id])
- end
- def self.previous(current)
- find(:first,:order=>"created_at desc",:conditions=>["id < ?",current.id])
- en
Add Comment
Please, Sign In to add comment