Sha256: 65bbe90d1e009b805d55bc6c862c8bc93ca1c4111b6b243f1ddfe1efa7f05ea0

Contents?: true

Size: 519 Bytes

Versions: 10

Compression:

Stored size: 519 Bytes

Contents

class Transponder.Error
  response: null

  constructor: ->
    doc = $(document)
    doc.ajaxError(@handleError)

  handleError: (event, xhr, settings, error) ->
    unless xhr.responseText is ""
      @response = JSON.parse(xhr.responseText) 
      eventType = Transponder.buildEvent ['ujs', @response.namespace, @response.controller, @response.action]
      $(document).trigger(eventType, @response)

class Transponder.InvalidService
  constructor: (message) ->   
    @message = message
    @name = "InvalidService"

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
transponder-0.1.5 lib/assets/javascripts/transponder/error.coffee
transponder-0.1.4 lib/assets/javascripts/transponder/error.coffee
transponder-0.1.3 lib/assets/javascripts/transponder/error.coffee
transponder-0.1.2 lib/assets/javascripts/transponder/error.coffee
transponder-0.1.1 lib/assets/javascripts/transponder/error.coffee
transponder-0.1.0 lib/assets/javascripts/transponder/error.coffee
transponder-0.0.8 lib/assets/javascripts/transponder/error.coffee
transponder-0.0.7 lib/assets/javascripts/transponder/error.coffee
transponder-0.0.6 lib/assets/javascripts/transponder/error.coffee
transponder-0.0.5 lib/assets/javascripts/transponder/error.coffee