Module: CatarseAutoHtml

Included in:
Project, Update
Defined in:
lib/catarse_auto_html.rb

Instance Method Summary collapse

Instance Method Details

#catarse_auto_html_for(options = {}) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/catarse_auto_html.rb', line 9

def catarse_auto_html_for options={}
  self.auto_html_for options[:field] do
    html_escape map: {
      '&' => '&',
      '>' => '>',
      '<' => '&lt;',
      '"' => '"' }
    image
    youtube width: options[:video_width], height: options[:video_height], wmode: "opaque"
    vimeo width: options[:video_width], height: options[:video_height]
    redcloth target: :_blank
    link target: :_blank
  end
end