Class: TranslationCms::Api::OrderPackage

Inherits:
Base
  • Object
show all
Extended by:
EnumField::EnumeratedAttribute, HstoreTranslate::Translates
Defined in:
lib/translation_cms/api/order_package.rb

Instance Method Summary collapse

Methods inherited from Base

all!, custom_scope!, default_attributes, destroy, dummy_resource!, #method_missing_with_translations_will_change, parsed!, path_with_custom_scope, resource_type!, update

Instance Method Details

#mkdwn_renderObject



39
40
41
42
43
44
# File 'lib/translation_cms/api/order_package.rb', line 39

def mkdwn_render
  @mkdwn_render ||= Redcarpet::Markdown.new(
    Redcarpet::Render::HTML.new,
    underline: true, tables: true, no_intra_emphasis: true, fenced_code_blocks: true, lax_spacing: true
  )
end

#raw_descriptionObject



35
36
37
# File 'lib/translation_cms/api/order_package.rb', line 35

def raw_description
  @raw_description ||= mkdwn_render.render(description)
end

#raw_notesObject



31
32
33
# File 'lib/translation_cms/api/order_package.rb', line 31

def raw_notes
  @raw_notes ||= mkdwn_render.render(notes)
end