spec/dummy/tmp/cache/assets/development/sprockets/c8730a8220ec89fcf6bb2da7a0f35093 in hyper_admin-0.2.0 vs spec/dummy/tmp/cache/assets/development/sprockets/c8730a8220ec89fcf6bb2da7a0f35093 in hyper_admin-0.3.0
- old
+ new
@@ -1,8 +1,8 @@
{I"
class:ETI"ProcessedAsset; FI"logical_path; TI"3hyper_admin/angularjs/controllers/form_ctrl.js; FI"
pathname; TI"u/home/sindre/Code/hyper/hyper_admin/app/assets/javascripts/hyper_admin/angularjs/controllers/form_ctrl.js.coffee; FI"content_type; TI"application/javascript; TI"
-mtime; Tl+ƬTI"length; TišI"digest; TI"%2f77cc0abc2589d1b2fdb4331a9b0e87; FI"source; TI"š(function() {
+mtime; Tl+øBTI"length; TiÑI"digest; TI"%a420f7c57f394932fe9ec10bc0f80c63; FI"source; TI"Ñ(function() {
angular.module("hyperadmin").controller("FormCtrl", function($scope, $state, Restangular, Flash) {
var method, mode, successMessage, target;
this.resource = {};
mode = $state.current.data.mode;
if (mode === "new") {
@@ -13,11 +13,18 @@
method = "patch";
target = "admin/" + $scope.resourceClass.plural + "/" + $state.params.id;
successMessage = "" + $scope.resourceClass.singular_human + " updated successfully.";
Restangular.one(target).get().then((function(_this) {
return function(resource) {
- return _this.resource = resource;
+ _this.resource = resource;
+ return $scope.resourceClass.attributes.forEach(function(attr) {
+ if (attr.type === "date" || attr.type === "datetime") {
+ if (_this.resource[attr.key]) {
+ return _this.resource[attr.key] = new Date(_this.resource[attr.key]);
+ }
+ }
+ });
};
})(this));
}
["id", "created_at", "updated_at"].forEach(function(key) {
return _.remove($scope.resourceClass.attributes, function(attr) {
@@ -45,7 +52,7 @@
})(this);
return this;
});
}).call(this);
-; TI"dependency_digest; TI"%a94690c992be8f68e12928aa2c8bef4e; FI"required_paths; T[I"u/home/sindre/Code/hyper/hyper_admin/app/assets/javascripts/hyper_admin/angularjs/controllers/form_ctrl.js.coffee; FI"dependency_paths; T[{I" path; TI"u/home/sindre/Code/hyper/hyper_admin/app/assets/javascripts/hyper_admin/angularjs/controllers/form_ctrl.js.coffee; FI"
-mtime; TI"2014-09-16T23:33:58+02:00; TI"digest; TI"%af1f2d0b01779944413ea6b821d17ffc; FI"
_version; TI"%3e3098c8a5e9a7f3b984ba95ac600637; F
+; TI"dependency_digest; TI"%f2d92fded74b5f6bbc219a3c3b2ffab5; FI"required_paths; T[I"u/home/sindre/Code/hyper/hyper_admin/app/assets/javascripts/hyper_admin/angularjs/controllers/form_ctrl.js.coffee; FI"dependency_paths; T[{I" path; TI"u/home/sindre/Code/hyper/hyper_admin/app/assets/javascripts/hyper_admin/angularjs/controllers/form_ctrl.js.coffee; FI"
+mtime; TI"2014-09-18T22:39:20+02:00; TI"digest; TI"%dab0c124cd805ca63143d664c32a402d; FI"
_version; TI"%6584930913c75ff69ba506e1cfbae2c9; F
\ No newline at end of file