stubbed in view code from old danbooru; only janitors can lock a wiki page

This commit is contained in:
albert
2011-02-28 14:18:39 -05:00
parent 6d0157265c
commit 9e7efbd295
47 changed files with 1124 additions and 79 deletions

View File

@@ -640,8 +640,10 @@ class Post < ActiveRecord::Base
if can_be_voted_by?(CurrentUser.user)
if score == "up"
increment!(:score)
increment!(:up_score)
elsif score == "down"
decrement!(:score)
decrement!(:down_score)
end
votes.create(:score => score)