Sha256: 7868f07d45295ce7ff41887aec27a89cb0c082185e25c3ec31ee18e831ae9b7f
Contents?: true
Size: 841 Bytes
Versions: 12
Compression:
Stored size: 841 Bytes
Contents
(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' }); } }); })();
Version data entries
12 entries across 12 versions & 1 rubygems