Skip to content

Commit

Permalink
fix: disable only when subscription change is pending
Browse files Browse the repository at this point in the history
  • Loading branch information
castrolem committed Oct 18, 2019
1 parent 974229e commit 7c201bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class UsersController < ApplicationController
# GET /users/1.json
def show
redirect_to root_path unless current_user == @user
@is_subscription_changing = UserPlanChange.where(user_id: @user.id).first
@is_subscription_changing = UserPlanChange.where(user_id: @user.id, status: 'pending').first
end

private
Expand Down

0 comments on commit 7c201bf

Please sign in to comment.