Sha256: 5b8e4d22f6b865a74200abf991bd8b48308062095ff093511da37d964be37822

Contents?: true

Size: 747 Bytes

Versions: 1

Compression:

Stored size: 747 Bytes

Contents

Volontariat.ApplicationRoute = Ember.Route.extend
  actions: 
    
    error: (error, transition) ->
      if error.status == 0
        alert 'Sorry, but we\'re having trouble connecting to the server. This problem is usually the result of a broken Internet connection. You can try refreshing this page.'
      else if error.status == 403
        alert 'Access denied!'
      else if error.status == 401
        alert 'Authentication required!'
      else if error.status == 404
        alert 'Page not found!'
      else
        alert "Something went wrong: HTTP status code #{error.status}!"
    
      if error.status == undefined
        return true
      else
        @transitionTo('index')
    
  renderTemplate: ->
    @render 'application'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
voluntary-ember_js-0.0.1 app/assets/javascripts/voluntary/ember_js/routes/application_route.js.coffee