Class: Decidim::Templates::Template

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

Instance Method Summary collapse

Instance Method Details

#destroy_templatableObject


28
29
30
# File 'decidim-templates/app/models/decidim/templates/template.rb', line 28

def destroy_templatable
  templatable.destroy
end

#resource_nameObject


24
25
26
# File 'decidim-templates/app/models/decidim/templates/template.rb', line 24

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