Module: MarkdownPreview::Helpers
- Defined in:
- lib/markdown_preview/helpers.rb
Overview
The helper module we include into ActionController::Base
Instance Method Summary collapse
-
#include_markdown_preview_css ⇒ Object
Form a JS include tag for the MarkdownPreview JS src for inclusion in the
. -
#include_markdown_preview_if_needed(options = {}, raw_options = nil) ⇒ Object
Form a JS include tag for the MarkdownPreview JS src, and form the raw JS and wrap in in a
Form a JS include tag for the MarkdownPreview JS src for inclusion in the
17 18 19
# File 'lib/markdown_preview/helpers.rb', line 17 def include_markdown_preview_css stylesheet_link_tag( "markdown_preview/markdown_preview" ) end
#include_markdown_preview_if_needed(options = {}, raw_options = nil) ⇒ Object
Form a JS include tag for the MarkdownPreview JS src, and form the raw JS and wrap in in a
Form a JS include tag for the MarkdownPreview JS src for inclusion in the
11 12 13 14
# File 'lib/markdown_preview/helpers.rb', line 11 def include_markdown_preview_js #javascript_include_tag (Rails.env.to_s == 'development' ? "markdown_preview/markdown_preview" : "markdown_preview/markdown_preview.min") javascript_include_tag (Rails.env.to_s == 'development' ? "markdown_preview/markdown_preview" : "markdown_preview/markdown_preview") end
#using_markdown_preview? ⇒ Boolean
Has uses_markdown_preview method been declared in the controller for this page?
6 7 8
# File 'lib/markdown_preview/helpers.rb', line 6 def using_markdown_preview? !@uses_markdown_preview.blank? end