Class: Onebox::Engine::ImageOnebox
- Inherits:
-
Object
- Object
- Onebox::Engine::ImageOnebox
- Includes:
- Onebox::Engine
- Defined in:
- lib/onebox/engine/image_onebox.rb
Constant Summary
Constants included from Onebox::Engine
Instance Attribute Summary
Attributes included from Onebox::Engine
Instance Method Summary collapse
Methods included from Onebox::Engine
engines, included, #initialize, #options, #options=, #placeholder_html
Instance Method Details
#to_html ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/onebox/engine/image_onebox.rb', line 8 def to_html # Fix Dropbox image links if /^https:\/\/www.dropbox.com\/s\//.match @url @url.gsub!("https://www.dropbox.com","https://dl.dropboxusercontent.com") end "<a href='#{@url}' target='_blank'><img src='#{@url}'></a>" end |