From 4b7cbf111f024841a249ea59b4f1ccb5e340a1b6 Mon Sep 17 00:00:00 2001 From: Patrick Gansterer Date: Fri, 5 Mar 2021 12:14:20 +0100 Subject: [PATCH] Fix small issues after 401c8f5 and 67ad202 --- app/controllers/orders_controller.rb | 2 +- app/helpers/application_helper.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/orders_controller.rb b/app/controllers/orders_controller.rb index 9323670f..9488a6bb 100644 --- a/app/controllers/orders_controller.rb +++ b/app/controllers/orders_controller.rb @@ -140,7 +140,7 @@ class OrdersController < ApplicationController Resque.enqueue(UserNotifier, FoodsoftConfig.scope, 'received_order', @order.id) if current_user.role_orders? || current_user.role_finance? redirect_to @order - elsif current_user.role_pickup? + elsif current_user.role_pickups? redirect_to pickups_path else redirect_to receive_order_path(@order) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index cbc99a5f..de207901 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -26,7 +26,7 @@ module ApplicationHelper # Splits an IBAN into groups of 4 digits displayed with margins in between def format_iban(iban) - iban.scan(/..?.?.?/).map { |item| content_tag(:span, item, style: "margin-right: 0.5em;") }.join.html_safe + iban && iban.scan(/..?.?.?/).map { |item| content_tag(:span, item, style: "margin-right: 0.5em;") }.join.html_safe end # Creates ajax-controlled-links for pagination