Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 20th, 2012  |  syntax: None  |  size: 0.41 KB  |  hits: 7  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. ## AJAX:
  2.       text = $('#URL').val()
  3.       $.ajax
  4.         url: ($ this).data 'update-path'
  5.         type: 'POST'
  6.         data:
  7.           url: text
  8.         dataType: 'script'
  9.  
  10. # Controller:
  11.     @url = params[:url]
  12.     STDERR.puts @url
  13.  
  14.  
  15. # Output of controller is:
  16. http://www.example.com/forum/viewtopic.php?f=23
  17.  
  18. BUT I send this URL:
  19. http://www.example.com/forum/viewtopic.php?f=23&t=1330
  20.  
  21. So URL gets cut by the & it seems.