Module: RewardsHelper

Defined in:
app/helpers/rewards_helper.rb

Overview

typed: false encoding: utf-8 frozen_string_literal: true

Instance Method Summary collapse

Instance Method Details

#reward_popover(reward) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
# File 'app/helpers/rewards_helper.rb', line 5

def reward_popover(reward)
  return '' if reward.nil?
   :div, class: 'btn btn-default btn-sm' do
    concat (:div, 'Reward', class: 'show-popover-reward')

    popup = (:div, class: 'hide') do
      concat (:p, "Points Pending: #{reward.points_pending}")
      concat (:p, "Points Total: #{reward.points_total}")
    end
    concat popup
  end
end