lib/rails-gallery/view_helper.rb in rails-gallery-0.3.2 vs lib/rails-gallery/view_helper.rb in rails-gallery-0.3.3
- old
+ new
@@ -16,25 +16,25 @@
# autoload all galleries when references
galleries.each do |gallery|
autoload gallery.camelize.to_sym, "rails-gallery/view_helper/#{gallery}"
end
- def gallery_image type, photo
+ def gallery_image type, photo, options = {}
meth_name = "#{type}_gallery_image"
validate_gallery_photo! photo
unless respond_to? meth_name
raise ArgumentError, "Gallery #{type} is not yet supported. Please add a View helper module for this gallery using the convention followed by the other galleries..."
end
- send(meth_name, photo)
+ send(meth_name, photo, options)
end
- def gallery_imageset type, imageset
+ def gallery_imageset type, imageset, options = {}
meth_name = "#{type}_gallery_imageset"
# validate_gallery_imageset! imageset
unless respond_to? meth_name
raise ArgumentError, "Gallery #{type} is not yet supported for imageset. Please add a View helper module for this gallery using the convention followed by the other galleries..."
end
- send(meth_name, imageset)
+ send(meth_name, imageset, options)
end
protected
# include view helper modules for all galleries :)