summaryrefslogtreecommitdiff
path: root/app/views/phone_numbers/_listing.html.haml
blob: ca002c5780c956ad7cc9b52d353dcfb0e73fdd54 (plain)
1
2
3
4
5
6
7
8
- amount_of_phone_numbers = phone_numbers.count
- if amount_of_phone_numbers > 0
  - if amount_of_phone_numbers < 110
    = phone_numbers.map{|number| number}.join(', ')
  - else
    = phone_numbers.limit(30).map{|number| number}.join(', ') + ', '
    = '[...]'
    = phone_numbers.offset(amount_of_phone_numbers - 30).map{|number| number}.join(', ')