Class: PolicyManager::Term
- Inherits:
-
ApplicationRecord
- Object
- ActiveRecord::Base
- ApplicationRecord
- PolicyManager::Term
- Includes:
- AASM
- Defined in:
- app/models/policy_manager/term.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.renderer ⇒ Object
26 27 28 |
# File 'app/models/policy_manager/term.rb', line 26 def self.renderer @markdown = markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true, tables: true) end |
Instance Method Details
#rule ⇒ Object
34 35 36 |
# File 'app/models/policy_manager/term.rb', line 34 def rule PolicyManager::Config.rules.find{|o| o.name == self[:rule]} end |
#to_html ⇒ Object
30 31 32 |
# File 'app/models/policy_manager/term.rb', line 30 def to_html self.class.renderer.render(self.description) end |