journalduhacker/app/controllers/moderations_controller.rb
joshua stein e6c74e8251 add moderation logging
- add users.is_moderator and look at that for most things, not
is_admin

- make default user in readme be a moderator

- log moderator actions in story edits, comment
  deletions/undeletions (and later, user disabling).

- remove ability for moderators to edit comments, there's really no
  reason to.
2012-09-02 12:18:52 -05:00

14 lines
290 B
Ruby

class ModerationsController < ApplicationController
def index
@pages = Moderation.count
@page = params[:page] ? params[:page].to_i : 0
if @page < 1
@page = 1
end
@moderations = Moderation.order("id desc").limit(50).offset((@page - 1) *
50).all
end
end