diff --git a/app/controllers/mod_actions_controller.rb b/app/controllers/mod_actions_controller.rb index c8973702c..4197e2718 100644 --- a/app/controllers/mod_actions_controller.rb +++ b/app/controllers/mod_actions_controller.rb @@ -1,5 +1,5 @@ class ModActionsController < ApplicationController def index - @mod_actions = ModAction.search(params[:search]).paginate(params[:page]) + @mod_actions = ModAction.search(params[:search]).order("id desc").paginate(params[:page]) end end diff --git a/app/logical/d_text.rb b/app/logical/d_text.rb index 7a636e113..c676ab8a1 100644 --- a/app/logical/d_text.rb +++ b/app/logical/d_text.rb @@ -75,6 +75,7 @@ class DText str = str.gsub(/\bforum #(\d+)/i, %{forum #\\1}) str = str.gsub(/\bcomment #(\d+)/i, %{comment #\\1}) str = str.gsub(/\bpool #(\d+)/i, %{pool #\\1}) + str = str.gsub(/\buser #(\d+)/i, %{user #\\1}) end def self.parse_list(str, options = {}) diff --git a/app/models/user.rb b/app/models/user.rb index a063d215b..c3d083a17 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -63,6 +63,7 @@ class User < ActiveRecord::Base module InvitationMethods def invite!(level) if level.to_i <= Levels::CONTRIBUTOR + ModAction.create(:description => "invited user ##{id} (#{name})") self.level = level self.inviter_id = CurrentUser.id save diff --git a/app/views/mod_actions/index.html.erb b/app/views/mod_actions/index.html.erb index 1fbacde06..8fd0e0792 100644 --- a/app/views/mod_actions/index.html.erb +++ b/app/views/mod_actions/index.html.erb @@ -1,7 +1,7 @@

Mod Actions

- +
@@ -12,7 +12,7 @@ <% @mod_actions.each do |mod_action| %> - +
Date
<%= mod_action.created_at %><%= compact_time mod_action.created_at %> <%= link_to mod_action.creator.name, user_path(mod_action.creator) %> <%= format_text(mod_action.description) %>