Sha256: 69d0176cf6a064b25386c6483a8116657b25dbb8ab8a6f92f65400d240c9a781
Contents?: true
Size: 1.22 KB
Versions: 15
Compression:
Stored size: 1.22 KB
Contents
module Katello module Concerns module BaseTemplateScopeExtensions extend ActiveSupport::Concern module Overrides def allowed_helpers super + [:errata, :host_subscriptions, :host_applicable_errata_ids, :host_applicable_errata_filtered, :host_latest_applicable_rpm_version, :load_pools] end end included do prepend Overrides end def errata(id) Katello::Erratum.in_repositories(Katello::Repository.readable).with_identifiers(id).map(&:attributes).first.slice!('created_at', 'updated_at') end def host_subscriptions(host) host.subscriptions end def host_applicable_errata_ids(host) host.applicable_errata.map(&:errata_id) end def host_applicable_errata_filtered(host, filter = '') host.applicable_errata.search_for(filter) end def host_latest_applicable_rpm_version(host, package) host.applicable_rpms.where(name: package).order(:version_sortable).limit(1).pluck(:nvra).first end def load_pools(search: '', includes: nil) load_resource(klass: Pool.readable, search: search, permission: nil, includes: includes) end end end end
Version data entries
15 entries across 15 versions & 1 rubygems