relative timestamps

This commit is contained in:
jomo
2014-05-02 05:12:16 +02:00
parent 04066ba49f
commit a2ac6582b1
14 changed files with 70 additions and 23 deletions

View File

@@ -57,6 +57,21 @@ class ForumsController < ApplicationController
end
end
def destroy
if admin?
if @forum.destroy
flash[:notice] = "Forum deleted."
else
flash[:alert] = "Something went wrong"
render :new
return
end
else
flash[:alert] = "You are not allowed to delete a forum."
end
redirect_to forums_path
end
private