Add authorization to user controller

This commit is contained in:
benji 2015-09-08 17:40:40 +02:00
parent 52808c27df
commit 2f07856b67
2 changed files with 5 additions and 1 deletions

View file

@ -1,4 +1,6 @@
class UsersController < ApplicationController
load_and_authorize_resource
def show
@user = User.find(params[:id])
end

View file

@ -8,7 +8,9 @@
</head>
<body>
<%= yield %>
<%= content_tag :div, flash[:alert] if flash[:alert] %>
<%= yield %>
</body>
</html>