Sha256: dc44be070a04679394ce49498b1439da72b28c6b7a2ad069b8ee1dd303e2ed34

Contents?: true

Size: 1.68 KB

Versions: 2

Compression:

Stored size: 1.68 KB

Contents

{I"
class:ETI"ProcessedAsset;FI"logical_path;TI"*blogelator/routes/posts_edit_route.js;FI"
pathname;TI"k/Users/brian/github/codelation/blogelator/app/assets/javascripts/blogelator/routes/posts_edit_route.js;FI"content_type;TI"application/javascript;TI"
mtime;Tl+IĆSI"length;TiII"digest;TI"%39cafaf9b60624a18619d60fd5aee88d;FI"source;TI"I(function() {
  "use strict";
  
  App.PostsEditRoute = Ember.Route.extend({
    actions: {
      willTransition: function(transition) {
        var record = this.get('controller.content');
        
        // Confirm transition if there are unsaved changes
        if (record.get('isDirty')) {
          if (confirm("Are you sure you want to lose unsaved changes?")) {
            record.rollback();
            return true;
          } else {
            transition.abort();
          }
        } else {
          return true;
        }
      }
    },
    
    model: function(params) {
      return this.store.find('post', params.post_id);
    },
    
    renderTemplate: function() {
      this.render(); 
      this.render('posts/_form_action_bar', {
        into: 'application',
        outlet: 'footer'
      });
    }
  });
  
})();
;TI"dependency_digest;TI"%5dd16a4b71083321f295c283324dcafc;FI"required_paths;T[I"k/Users/brian/github/codelation/blogelator/app/assets/javascripts/blogelator/routes/posts_edit_route.js;FI"dependency_paths;T[{I"	path;TI"k/Users/brian/github/codelation/blogelator/app/assets/javascripts/blogelator/routes/posts_edit_route.js;FI"
mtime;TI"2014-03-09T14:38:49-05:00;TI"digest;TI"%39cafaf9b60624a18619d60fd5aee88d;FI"
_version;TI"%a56df69ef97ba4d9f1a23bf9b0add58a;F

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
blogelator-0.2.4 spec/dummy/tmp/cache/assets/development/sprockets/8099cc04495d5ad8fc3842f9c370f598
blogelator-0.2.3 spec/dummy/tmp/cache/assets/development/sprockets/8099cc04495d5ad8fc3842f9c370f598