Class: Ecm::Links::Link

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/ecm/links/link.rb

Constant Summary collapse

MARKUP_LANGUAGES =

constants

%w(markdown textile rdoc)

Instance Method Summary collapse

Instance Method Details

#description(options = {}) ⇒ Object



24
25
26
27
28
29
30
31
32
# File 'app/models/ecm/links/link.rb', line 24

def description(options = {})
  options.reverse_merge!(as: :plain)
  case options[:as]
  when :html
    markup(self[:description])
  else
    self[:description]
  end
end