diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 3b9390c..d191303 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -1,4 +1,6 @@ class UsersController < ApplicationController + load_and_authorize_resource + def show @user = User.find(params[:id]) end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 1bf645f..376e9b4 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -8,7 +8,9 @@ -<%= yield %> + <%= content_tag :div, flash[:alert] if flash[:alert] %> + + <%= yield %>