Skip to content

Commit 50d357d

Browse files
committed
Handle unauthenticated user accessing coffee shop owners page
1 parent 49b72ef commit 50d357d

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

app/controllers/coffee_shops/feedbacks_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
class CoffeeShops::FeedbacksController < ApplicationController
2+
before_action :authenticate_user!
3+
24
def index
35
@coffee_shop = current_user.coffee_shops.find_by(slug: params[:coffee_shop_id])
46

app/controllers/coffee_shops/locations_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
class CoffeeShops::LocationsController < ApplicationController
2+
before_action :authenticate_user!
3+
24
def edit
35
@coffee_shop =
46
current_user.coffee_shops.find_by(slug: params[:coffee_shop_id]) ||

app/controllers/coffee_shops/opening_hours_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
class CoffeeShops::OpeningHoursController < ApplicationController
2+
before_action :authenticate_user!
3+
24
def edit
35
@coffee_shop =
46
current_user.coffee_shops.find_by(slug: params[:coffee_shop_id]) ||

0 commit comments

Comments
 (0)