Guest User

Untitled

a guest
Jun 23rd, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. def self.next(current)
  2. find(:first,:order=>"created_at",:conditions=>["id > ?",current.id])
  3. end
  4.  
  5. def self.previous(current)
  6. find(:first,:order=>"created_at desc",:conditions=>["id < ?",current.id])
  7. en
Add Comment
Please, Sign In to add comment