Module: SpreeCmCommissioner::Telegram::BaseHelper
- Defined in:
- app/helpers/spree_cm_commissioner/telegram/base_helper.rb
Instance Method Summary collapse
Instance Method Details
#pretty_time(time) ⇒ Object
10 11 12 13 14 |
# File 'app/helpers/spree_cm_commissioner/telegram/base_helper.rb', line 10 def pretty_time(time) return '' if time.blank? [I18n.l(time.to_date, format: :long), time.strftime('%l:%M %p %Z')].join(' ') end |
#render_image ⇒ Object
4 5 6 7 8 |
# File 'app/helpers/spree_cm_commissioner/telegram/base_helper.rb', line 4 def render_image return unless item.variant.images.any? image_tag main_app.cdn_image_url(item.variant.images.first.url(:small)), :class => 'mr-3' end |