class Administrate::Field::Markdown
Constants
- VERSION
Public Instance Methods
rendered()
click to toggle source
# File lib/administrate/field/markdown.rb, line 13 def rendered Kramdown::Document.new(data).to_html end
truncate()
click to toggle source
# File lib/administrate/field/markdown.rb, line 17 def truncate data.to_s[0...truncation_length] end
Private Instance Methods
truncation_length()
click to toggle source
# File lib/administrate/field/markdown.rb, line 23 def truncation_length options.fetch(:truncate, 50) end