Module: ApplicationHelper

Includes:
Jinda::Helpers
Defined in:
lib/jinda/railtie.rb,
lib/generators/jinda/templates/app/helpers/application_helper.rb

Defined Under Namespace

Classes: CodeRayify

Instance Method Summary collapse

Instance Method Details

#markdown(text) ⇒ Object



21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/generators/jinda/templates/app/helpers/application_helper.rb', line 21

def markdown(text)
  coderayified = CodeRayify.new(:filter_html => true, 
                                :hard_wrap => true)
  options = {
    :fenced_code_blocks => true,
    :no_intra_emphasis => true,
    :autolink => true,
    :lax_html_blocks => true,
  }
  markdown_to_html = Redcarpet::Markdown.new(coderayified, options)
  markdown_to_html.render(text).html_safe
end

#meta_description(blog_text) ⇒ Object



7
8
9
# File 'lib/generators/jinda/templates/app/helpers/application_helper.rb', line 7

def meta_description(blog_text)
  content_for(:meta_description) { blog_text }
end

#title(blog_title) ⇒ Object



3
4
5
# File 'lib/generators/jinda/templates/app/helpers/application_helper.rb', line 3

def title(blog_title)
  content_for(:title) { blog_title }
end