tab/app/assets/javascripts/transactions.coffee

18 lines
533 B
CoffeeScript
Raw Normal View History

2015-09-08 13:25:54 +00:00
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
2015-09-10 19:46:05 +00:00
ready = ->
$("#new_transaction").on("ajax:success", (e, data, status, xhr) ->
console.log("success")
).on("ajax:error", (e, xhr, status, error) ->
console.log(e)
console.log(xhr)
console.log("failed")
)
$.ajaxSetup({
dataType: 'json'
})
$(document).ready(ready)
$(document).on('page:load', ready)