Skip to content

Commit 4faf85b

Browse files
committed
Add empty :new action to Spree::UsersController
Without this, specs fail with ``` AbstractController::ActionNotFound: The new action could not be found for the :authorize_actions callback on Spree::UsersController, but it is listed in the controller's :only option. ``` I guess this is because the views are not in the standard place, thus impeding Rails' ability to dynamically generate empty actions if matching views are present. Anyways: This is good, because it's more explicit.
1 parent 89c8d1b commit 4faf85b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

lib/controllers/frontend/spree/users_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ class Spree::UsersController < Spree::StoreController
44
skip_before_action :set_current_order, only: :show, raise: false
55
prepend_before_action :authorize_actions, only: :new
66

7+
def new; end
8+
79
def show
810
load_object
911
@orders = @user.orders.complete.order('completed_at desc')

0 commit comments

Comments
 (0)