I have a rails 3.1 app and I am making an ajax call with jquery when a user clicks a checkbox.
Everything seems to work as expected but I am getting the following error in the console
Uncaught TypeError: object is not a function
(anonymous function)application.js:9329
jQuery.event.handleapplication.js:2966
jQuery.event.add.elemData.handle.eventHandle
here is the coffeescript that I have for the page that I am loading
jQuery ->
$(".checkbox").click ->
current_id = $(this).attr("id") ->
obj =
url: "/challenge/public?id=" + current_id
success: ( data ) -> alert data.result
error: () -> alert "error"
$.ajax(obj) ->