Merge pull request #2304 from r888888888/admin-dashboard

Admin dashboard
This commit is contained in:
Albert Yi
2014-11-07 14:12:55 -08:00
16 changed files with 224 additions and 157 deletions

View File

@@ -0,0 +1,9 @@
module Admin
class DashboardsController < ApplicationController
before_filter :admin_only
def show
@dashboard = AdminDashboard.new
end
end
end

View File

@@ -18,7 +18,8 @@ class UserNameChangeRequestsController < ApplicationController
if @change_request.errors.any?
render :action => "new"
else
redirect_to user_name_change_request_path(@change_request), :notice => "Your request has been submitted and is pending admin review"
@change_request.approve!
redirect_to user_name_change_request_path(@change_request), :notice => "Your name has been changed"
end
end