Sha256: e8c9ec55076dbe8d4dde84d3e96dbd85bd75f36b26e67ccb21171010d52f6ac6
Contents?: true
Size: 1.02 KB
Versions: 7
Compression:
Stored size: 1.02 KB
Contents
# Author:: Carlo Bertini (WaYdotNET) # WebSite:: http://blogs.ugidotnet.org/carlitoway # Based on LightBoxHelper # Many thx to Davide D'Agostino (DAddYE) require 'action_view' module ActionView module Helpers module LightWindowHelper def self.included(base) base.class_eval do include InstanceMethods end end module InstanceMethods def lightwindow_link_to(name, options = {}, html_options = {}, *parameters_for_method_reference) html_options.merge!(:class => "lightwindow") unless html_options[:class] # url_for(options) it's hack to resolve this problem # http://railsforum.com/viewtopic.php?pid=46594 (thx to DAddYE) link_to(name, url_for(options) + "/", html_options, *parameters_for_method_reference) end end end end end ActionView::Base.class_eval do include ActionView::Helpers::LightWindowHelper end ActionView::Helpers::AssetTagHelper.register_javascript_include_default 'lightwindow'
Version data entries
7 entries across 7 versions & 1 rubygems