2015-10-02 21:05:03 +02:00
|
|
|
module ApplicationHelper
|
2015-10-05 12:40:08 +02:00
|
|
|
def title(page_title)
|
2015-10-06 09:38:52 +02:00
|
|
|
content_for :title, strip_tags(page_title.to_s)
|
2015-10-05 12:40:08 +02:00
|
|
|
page_title
|
|
|
|
|
end
|
2017-11-12 13:27:10 +01:00
|
|
|
|
|
|
|
|
def markdown(content)
|
|
|
|
|
@markdown ||= Redcarpet::Markdown.new(Redcarpet::Render::HTML, autolink: true, space_after_headers: true)
|
|
|
|
|
@markdown.render(content)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def admin?
|
|
|
|
|
current_supporter && current_supporter.admin?
|
|
|
|
|
end
|
2015-10-02 21:05:03 +02:00
|
|
|
end
|