Fix small issues after 401c8f5 and 67ad202

This commit is contained in:
Patrick Gansterer 2021-03-05 12:14:20 +01:00
parent 38d49dedb8
commit 4b7cbf111f
2 changed files with 2 additions and 2 deletions

View file

@ -140,7 +140,7 @@ class OrdersController < ApplicationController
Resque.enqueue(UserNotifier, FoodsoftConfig.scope, 'received_order', @order.id) Resque.enqueue(UserNotifier, FoodsoftConfig.scope, 'received_order', @order.id)
if current_user.role_orders? || current_user.role_finance? if current_user.role_orders? || current_user.role_finance?
redirect_to @order redirect_to @order
elsif current_user.role_pickup? elsif current_user.role_pickups?
redirect_to pickups_path redirect_to pickups_path
else else
redirect_to receive_order_path(@order) redirect_to receive_order_path(@order)

View file

@ -26,7 +26,7 @@ module ApplicationHelper
# Splits an IBAN into groups of 4 digits displayed with margins in between # Splits an IBAN into groups of 4 digits displayed with margins in between
def format_iban(iban) 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 end
# Creates ajax-controlled-links for pagination # Creates ajax-controlled-links for pagination