how to give whitespace in ruby slim
Another option:
p
strong Total:
span
= [@order.currency, humanized_money_with_symbol @order.total_paisas/100].join(' ')
You can solve this with string interpolation, by doing something like this:
p
strong Total:
span
= "#{@order.currency} #{humanized_money_with_symbol @order.total_paisas/100}"
Or with a non-breaking space (nbsp) like this:
p
strong Total:
span
= @order.currency
|
= humanized_money_with_symbol @order.total_paisas/100
You can also use Slim output =>
or =<
https://github.com/slim-template/slim#output-
Use trailing space on the first output
p
strong Total:
span
=> @order.currency
= humanized_money_with_symbol @order.total_paisas/100
or use leading space on the second output
p
strong Total:
span
= @order.currency
=< humanized_money_with_symbol @order.total_paisas/100