better readable IBAN (#824)
display IBANs in groups of 4 digits with whitespaces in between
This commit is contained in:
parent
00f1dddd3d
commit
401c8f50a8
7 changed files with 11 additions and 6 deletions
|
|
@ -25,6 +25,11 @@ module ApplicationHelper
|
|||
content_tag :span, number_to_currency(amount), class: class_name
|
||||
end
|
||||
|
||||
# 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
|
||||
end
|
||||
|
||||
# Creates ajax-controlled-links for pagination
|
||||
def pagination_links_remote(collection, options = {})
|
||||
per_page = options[:per_page] || @per_page
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue