facebox_render
facebox_render copied to clipboard
nil error in Rails 3.1
def facebook_link_to should initialize html_options to a hash, not nil, to avoid nil error:
def facebox_link_to(name, options = {}, html_options = {})
link_to_function(name, "jQuery.facebox(function(){ jQuery.ajax({data:'authenticity_token=' + encodeURIComponent('#{options[:authenticity_token]}'), dataType:'script', type:'#{options[:method]}', url:'#{options[:url]}'})})", html_options)
end
Worked for me, thanks.