This commit is contained in:
Toks
2013-05-18 09:36:20 -04:00
parent 5632f8c05c
commit a680555e72
2 changed files with 9 additions and 5 deletions

View File

@@ -144,6 +144,10 @@ class Pool < ActiveRecord::Base
post_ids =~ /(?:\A| )#{post_id}(?:\Z| )/
end
def page_number(post_id)
post_id_array.find_index(post_id) + 1
end
def deletable_by?(user)
user.is_janitor?
end