Sha256: da0e62d5adfe2ecc7443e8cb3bb9ff1182707bef834d67c0c8820daf19adf553

Contents?: true

Size: 1.68 KB

Versions: 1

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"%bc4b616765719dcdde349234991270e9;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"%76663b855b6da259059eb8799ebc276f;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"%bc4b616765719dcdde349234991270e9;FI"
_version;TI"%361c512b9086418778df946c0d278f91;F

Version data entries

1 entries across 1 versions & 1 rubygems

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