Sha256: ce879a80dc5fa4e0075c977ee04a5c321188d3210be9d836456e137e3a4623ad

Contents?: true

Size: 294 Bytes

Versions: 6

Compression:

Stored size: 294 Bytes

Contents

# frozen_string_literal: true

module Decidim
  class BadgesCell < Decidim::ViewModel
    include Decidim::Core::Engine.routes.url_helpers

    def available_badges
      Decidim::Gamification.badges.select do |badge|
        badge.valid_for?(model)
      end.sort_by(&:name)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
decidim-core-0.29.1 app/cells/decidim/badges_cell.rb
decidim-core-0.29.0 app/cells/decidim/badges_cell.rb
decidim-core-0.29.0.rc4 app/cells/decidim/badges_cell.rb
decidim-core-0.29.0.rc3 app/cells/decidim/badges_cell.rb
decidim-core-0.29.0.rc2 app/cells/decidim/badges_cell.rb
decidim-core-0.29.0.rc1 app/cells/decidim/badges_cell.rb