now requiring authentication on certain pages
This commit is contained in:
parent
82c2463509
commit
78bda1fc5f
|
@ -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
|
||||||
|
|
|
@ -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!
|
||||||
|
|
Loading…
Reference in New Issue