added popular exploration, added order:rank

This commit is contained in:
albert
2011-08-11 15:39:51 -04:00
parent bd51079fc1
commit e42ea9c608
25 changed files with 296 additions and 61 deletions

View File

@@ -1,6 +1,7 @@
class NoteVersion < ActiveRecord::Base
before_validation :initialize_updater
belongs_to :updater, :class_name => "User"
scope :for_user, lambda {|user_id| where("updater_id = ?", user_id)}
def initialize_updater
self.updater_id = CurrentUser.id