- @next = Note.find(:first, :order => "id ASC", :conditions => [ "status != 'hidden' AND id > :id", { :id => @note.id }] )
- @prev = Note.find(:first, :order => "id DESC", :conditions => [ "status != 'hidden' AND id < :id", { :id => @note.id }] )
+ @next = Note.visible.where("id > ?", @note.id).order(:id => :asc).first
+ @prev = Note.visible.where("id < ?", @note.id).order(:id => :desc).first