Skip to content

Instantly share code, notes, and snippets.

@cmwelsh
Forked from anonymous/gist:1860713
Created February 18, 2012 19:47
Show Gist options
  • Save cmwelsh/1860779 to your computer and use it in GitHub Desktop.
Save cmwelsh/1860779 to your computer and use it in GitHub Desktop.
## AJAX:
text = $('#URL').val()
$.ajax
url: ($ this).data 'update-path'
type: 'POST'
data:
url: text
dataType: 'script'
# Controller:
@url = params[:url]
STDERR.puts @url
# Output of controller is:
http://www.example.com/forum/viewtopic.php?f=23
BUT I send this URL:
http://www.example.com/forum/viewtopic.php?f=23&t=1330
So URL gets cut by the & it seems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment