Class: SnippetDecorator

Inherits:
ApplicationDecorator show all
Defined in:
app/decorators/snippet_decorator.rb

Instance Method Summary collapse

Methods inherited from ApplicationDecorator

collection_decorator_class

Instance Method Details

#contentObject



7
8
9
10
# File 'app/decorators/snippet_decorator.rb', line 7

def content
  string = object.content.to_s
  object.allow_html_in_content? ? string.html_safe : string
end

#titleObject



2
3
4
5
# File 'app/decorators/snippet_decorator.rb', line 2

def title
  string = object.title.to_s
  object.allow_html_in_title? ? string.html_safe : string
end