Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixing 'Ajax is not defined' bug

  • Loading branch information...
commit b41b8667bd1243b5e92b96e725d8db9b94dbcaf3 1 parent 8a9d596
rafaelmacedo authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/facebox_render_helper.rb
View
4 lib/facebox_render_helper.rb
@@ -1,7 +1,7 @@
module FaceboxRenderHelper
- def facebox_link_to(name, options = {}, html_options = nil)
- link_to_function(name, "jQuery.facebox(function(){ #{remote_function(options)} })", html_options || options.delete(:html))
+ def facebox_link_to(name, options = {}, html_options = nil)
+ 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 || options.delete(:html))
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.