This commit is contained in:
Toks
2013-08-13 13:33:25 -04:00
parent d83aa5de0e
commit 249ab23da5
5 changed files with 40 additions and 2 deletions

View File

@@ -27,6 +27,10 @@ class PostFlag < ActiveRecord::Base
where("created_at <= ?", 3.days.ago)
end
def for_creator(user_id)
where("creator_id = ?", user_id)
end
def search(params)
q = scoped
return q if params.blank?