Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nil error in Rails 3.1 #6

Open
futura opened this issue Dec 13, 2011 · 1 comment
Open

nil error in Rails 3.1 #6

futura opened this issue Dec 13, 2011 · 1 comment

Comments

@futura
Copy link

futura commented Dec 13, 2011

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
@cogmation
Copy link

Worked for me, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants