splendeo-lightbox2_helpers 0.5.9 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/lightbox2_helpers/form_helpers.rb +7 -4
- metadata +1 -1
@@ -21,7 +21,7 @@ module Lightbox2Helpers::FormHelpers
|
|
21
21
|
# === :group
|
22
22
|
# It will be possible to iterate over links of the same "group" (with "next", "previous" links)
|
23
23
|
#
|
24
|
-
# <%= link_to_lightbox2
|
24
|
+
# <%= link_to_lightbox2(:group => "avatars") do %>
|
25
25
|
# This is also part of the link <%= image_tag "picture.jpg">
|
26
26
|
# <% end %>
|
27
27
|
#
|
@@ -37,13 +37,16 @@ module Lightbox2Helpers::FormHelpers
|
|
37
37
|
html_options = args.third || {}
|
38
38
|
end
|
39
39
|
|
40
|
-
if options
|
40
|
+
if options.include? :group
|
41
41
|
html_options[:rel] = "lightbox[#{options[:group]}]"
|
42
|
+
options.delete :group
|
42
43
|
else
|
43
44
|
html_options[:rel] = "lightbox"
|
44
45
|
end
|
45
|
-
|
46
|
-
|
46
|
+
if options.include? :title
|
47
|
+
html_options[:title] = options[:title]
|
48
|
+
options.delete :title
|
49
|
+
end
|
47
50
|
|
48
51
|
if block_given?
|
49
52
|
concat link_to(capture(&block), options, html_options)
|