now requiring authentication on certain pages

This commit is contained in:
nilsding 2014-11-11 19:53:25 +01:00
parent 82c2463509
commit 78bda1fc5f
2 changed files with 4 additions and 1 deletions

View File

@ -1,4 +1,6 @@
class InboxController < ApplicationController class InboxController < ApplicationController
before_filter :authenticate_user!
def show def show
@inbox = Inbox.where(user: current_user).order(:created_at).reverse_order @inbox = Inbox.where(user: current_user).order(:created_at).reverse_order
end end

View File

@ -4,10 +4,11 @@ class UserController < ApplicationController
end end
def edit def edit
authenticate_user!
end end
def update def update
authenticate_user!
params.require(:display_name) params.require(:display_name)
current_user.display_name = params[:display_name] current_user.display_name = params[:display_name]
current_user.save! current_user.save!