Sha256: f0ae692af2889f263502994282fdaed79643e4db1910f2e917d544624c2ed9c3

Contents?: true

Size: 1.69 KB

Versions: 2

Compression:

Stored size: 1.69 KB

Contents

{I"
class:ETI"ProcessedAsset;FI"logical_path;TI":blogelator/controllers/posts/posts_show_controller.js;FI"
pathname;TI"{/Users/brian/github/codelation/blogelator/app/assets/javascripts/blogelator/controllers/posts/posts_show_controller.js;FI"content_type;TI"application/javascript;TI"
mtime;Tl+ƒ=SI"length;TiI"digest;TI"%b63454c4d408d79c763e5ef4b1fee255;FI"source;TI"(function() {
  "use strict";
  
  App.PostsShowController = Ember.ObjectController.extend({
    needs: ['posts'],
    
    actions: {      
      togglePublished: function(defer) {
        var post = this.get('content');
        
        if (Ember.isNone(post.get('publishedAt'))) {
          post.set('publishedAt', new Date());
        } else {
          post.set('publishedAt', null);
        }
        
        if (Ember.isNone(defer)) {
          post.save();
          return post;
        }
        
        if (!post.get('isDirty')) {
          defer.resolve();
        } else {
          post.save().then(function() {
            defer.resolve();
          }, function() {
            defer.reject();
          });
        }
        
        return post;
      }
    }
  });

})();
;TI"dependency_digest;TI"%34fb712fcf0d99b05a7bf296c25f6412;FI"required_paths;T[I"{/Users/brian/github/codelation/blogelator/app/assets/javascripts/blogelator/controllers/posts/posts_show_controller.js;FI"dependency_paths;T[{I"	path;TI"{/Users/brian/github/codelation/blogelator/app/assets/javascripts/blogelator/controllers/posts/posts_show_controller.js;FI"
mtime;TI"2014-03-07T15:43:31-06:00;TI"digest;TI"%b63454c4d408d79c763e5ef4b1fee255;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/fc4c248705c8d53f522afbaa47265569
blogelator-0.2.3 spec/dummy/tmp/cache/assets/development/sprockets/fc4c248705c8d53f522afbaa47265569