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
|
||||
load_and_authorize_resource
|
||||
|
||||
def show
|
||||
@user = User.find(params[:id])
|
||||
end
|
||||
|
|
|
@ -8,7 +8,9 @@
|
|||
</head>
|
||||
<body>
|
||||
|
||||
<%= yield %>
|
||||
<%= content_tag :div, flash[:alert] if flash[:alert] %>
|
||||
|
||||
<%= yield %>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in a new issue