Skip to content

Commit

Permalink
fixes error during settings rendering because method is not found
Browse files Browse the repository at this point in the history
  • Loading branch information
laugmanuel committed May 17, 2024
1 parent 0973c3e commit 81c39ca
Showing 1 changed file with 11 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,17 @@

module ForemanRescue
module ProvisioningTemplateExtensions
def self.templates_by_kind(kind)
template_kind = TemplateKind.find_by(name: kind)
ProvisioningTemplate.where(:template_kind => template_kind).pluck(:name, :name).to_h
def self.prepended(base)
class << base
prepend ClassMethods
end
end

module ClassMethods
def templates_by_kind(kind)
template_kind = TemplateKind.find_by(name: kind)
ProvisioningTemplate.where(:template_kind => template_kind).pluck(:name, :name).to_h
end
end
end
end

0 comments on commit 81c39ca

Please sign in to comment.