Module: SimpleShowcaseAdmin::ApplicationHelper
- Defined in:
- app/helpers/simple_showcase_admin/application_helper.rb
Instance Method Summary collapse
Instance Method Details
#featured_photo_exists ⇒ Object
3 4 5 |
# File 'app/helpers/simple_showcase_admin/application_helper.rb', line 3 def featured_photo_exists Photo.where(featured: true).count > 0 end |
#markdown(text) ⇒ Object
7 8 9 10 |
# File 'app/helpers/simple_showcase_admin/application_helper.rb', line 7 def markdown(text) markdown = Redcarpet::Markdown.new(Redcarpet::Render::HTML.new(:filter_html => true, :safe_links_only => true, :hard_wrap => true), autolink: true, no_intra_emphasis: true) markdown.render(text).html_safe end |