fix tickets bug with no description
This commit is contained in:
parent
8d322f56ef
commit
0e9d6b491b
2 changed files with 6 additions and 1 deletions
|
|
@ -21,4 +21,9 @@ module ConferenceHelper
|
||||||
'%20Sponsorship'
|
'%20Sponsorship'
|
||||||
].join
|
].join
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def short_ticket_description(ticket)
|
||||||
|
return unless ticket.description
|
||||||
|
markdown(ticket.description&.split("\n").first&.strip)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
%h3.text-center.word_break
|
%h3.text-center.word_break
|
||||||
= ticket.title
|
= ticket.title
|
||||||
.word_break
|
.word_break
|
||||||
= markdown(ticket.description.split("\n")&.first.strip)
|
= short_ticket_description(ticket)
|
||||||
%button.btn-block.btn.btn-lg.btn-success
|
%button.btn-block.btn.btn-lg.btn-success
|
||||||
%i.fa.fa-ticket.fa-fw{"aria-hidden": true}
|
%i.fa.fa-ticket.fa-fw{"aria-hidden": true}
|
||||||
= humanized_money_with_symbol(ticket.price)
|
= humanized_money_with_symbol(ticket.price)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue