facebox_render icon indicating copy to clipboard operation
facebox_render copied to clipboard

nil error in Rails 3.1

Open futura opened this issue 13 years ago • 1 comments

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

futura avatar Dec 13 '11 14:12 futura

Worked for me, thanks.

cogmation avatar Jul 03 '12 21:07 cogmation