Class: Decidim::Templates::Template

Inherits:
ApplicationRecord show all
Includes:
Decidim::Traceable
Defined in:
decidim-templates/app/models/decidim/templates/template.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.log_presenter_class_for(_log) ⇒ Object


34
35
36
# File 'decidim-templates/app/models/decidim/templates/template.rb', line 34

def self.log_presenter_class_for(_log)
  Decidim::Templates::AdminLog::TemplatePresenter
end

Instance Method Details

#destroy_templatableObject


30
31
32
# File 'decidim-templates/app/models/decidim/templates/template.rb', line 30

def destroy_templatable
  templatable.destroy
end

#resource_nameObject


26
27
28
# File 'decidim-templates/app/models/decidim/templates/template.rb', line 26

def resource_name
  [templatable_type.demodulize.tableize.singularize, "templates"].join("_")
end