Skip to content

nil error in Rails 3.1 #6

@futura

Description

@futura

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions