Module: MarkdownPreview::Base::ClassMethods
- Defined in:
- lib/markdown_preview/base.rb
Instance Method Summary collapse
-
#uses_markdown_preview(options = {}) ⇒ Object
The controller declaration to enable markdown_preview certain actions.
Instance Method Details
#uses_markdown_preview(options = {}) ⇒ Object
The controller declaration to enable markdown_preview certain actions. Takes any normal params you can send to a before_filter (only, except etc)
12 13 14 15 16 17 18 19 20 21 |
# File 'lib/markdown_preview/base.rb', line 12 def uses_markdown_preview( = {}) # Set instance vars in the current class proc = Proc.new do |c| c.instance_variable_set(:@uses_markdown_preview, true) end # Run the above proc before each page load this method is declared in before_filter(proc, ) end |