Add authorization to user controller
This commit is contained in:
parent
52808c27df
commit
2f07856b67
2 changed files with 5 additions and 1 deletions
|
@ -1,4 +1,6 @@
|
||||||
class UsersController < ApplicationController
|
class UsersController < ApplicationController
|
||||||
|
load_and_authorize_resource
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@user = User.find(params[:id])
|
@user = User.find(params[:id])
|
||||||
end
|
end
|
||||||
|
|
|
@ -8,7 +8,9 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<%= yield %>
|
<%= content_tag :div, flash[:alert] if flash[:alert] %>
|
||||||
|
|
||||||
|
<%= yield %>
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in a new issue