Sha256: f69339028b21477a4d2b3bff0582f5b2a59d9d976cab074483bad41704623514

Contents?: true

Size: 478 Bytes

Versions: 3

Compression:

Stored size: 478 Bytes

Contents

module GoGamification
  module RewardsHelper

    # Present unseen rewards for the given user.
    #
    # options - A Hash of options:
    #           for: A rewardable model.
    #
    # Returns HTML.
    def present_rewards options
      rewardable = options[:for]
      rewards      = rewardable.rewards.unseen
      presentation = render partial: 'go_gamification/rewards/presentation', locals: { rewards: rewards }

      rewards.see

      presentation
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
go_gamification-0.0.7 app/helpers/go_gamification/rewards_helper.rb
go_gamification-0.0.6 app/helpers/go_gamification/rewards_helper.rb
go_gamification-0.0.4 app/helpers/go_gamification/rewards_helper.rb