Module: Txtblx::TextblocksHelper

Defined in:
app/helpers/txtblx/textblocks_helper.rb

Instance Method Summary collapse

Instance Method Details

#txt(key) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'app/helpers/txtblx/textblocks_helper.rb', line 3

def txt(key)
  textblock = Textblock.by_key(key)
  if textblock.present?
     text = textblock.text_html
  else
     text =  I18n.t('txtblx.missing_key', key: key)
  end

  (:div, raw(text))
end