diff --git a/app/controllers/subscription_controller.rb b/app/controllers/subscription_controller.rb index 001eecfda6..a0473440c4 100644 --- a/app/controllers/subscription_controller.rb +++ b/app/controllers/subscription_controller.rb @@ -53,7 +53,7 @@ def add end # test for uniqueness, handle it as a validation error if you like - if TagSelection.where(following: true, user_id: current_user.uid, tid: tag.tid).positive? + if TagSelection.where(following: true, user_id: current_user.uid, tid: tag.tid).length.positive? flash[:error] = "You are already subscribed to '#{params[:name]}'" redirect_to "/subscriptions" + "?_=" + Time.now.to_i.to_s else