summaryrefslogtreecommitdiff
path: root/helpers
diff options
context:
space:
mode:
authorLars Henrik Mai <lars.mai@kontinui.de>2014-04-08 19:34:02 +0200
committerLars Henrik Mai <lars.mai@kontinui.de>2014-04-08 19:34:02 +0200
commitf1715809e81578e3ea5cce705635bb194f02d8cc (patch)
tree6bf50fb495e15aeec7b0332090df481bd2a6688e /helpers
parentd080050ea72de7e8ff3602b97817f337deba73f3 (diff)
allow image helper to set class on its container div
Diffstat (limited to 'helpers')
-rw-r--r--helpers/extra_image_helpers.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/helpers/extra_image_helpers.rb b/helpers/extra_image_helpers.rb
index 6a36415..8a1040d 100644
--- a/helpers/extra_image_helpers.rb
+++ b/helpers/extra_image_helpers.rb
@@ -20,6 +20,7 @@ module ExtraImageHelpers
caption = options.delete(:caption)
thumb_name = options.delete(:thumbnail)
thumb_path = "/img/#{thumb_name}"
+ container_opts = options.delete(:container_opts) || {}
image_link = content_tag(:a, href: path) do
image_tag(thumb_path, options)
@@ -27,7 +28,7 @@ module ExtraImageHelpers
caption_tag = content_tag :p, caption
- content_tag(:div) do
+ content_tag(:div, container_opts) do
image_link << caption_tag
end
end