test/dummy/tmp/cache/assets/D01/390/sprockets%2F152365a6c64bdbf13d80c22762c0f48b in collection-json-browser-0.0.6 vs test/dummy/tmp/cache/assets/D01/390/sprockets%2F152365a6c64bdbf13d80c22762c0f48b in collection-json-browser-0.0.7
- old
+ new
@@ -1,8 +1,8 @@
-o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1374996223.526995:@value"m {I"
+o: ActiveSupport::Cache::Entry :@compressedF:@expires_in0:@created_atf1375609943.915936:@value"é {I"
class:EFI"ProcessedAsset; FI"logical_path; FI"Bcollection_json_browser/angular/controllers/api_controller.js; TI"
pathname; FI"ƒ/Users/weilu/workspace/collection-json-browser/app/assets/javascripts/collection_json_browser/angular/controllers/api_controller.js; TI"content_type; FI"application/javascript; FI"
-mtime; FI"2013-07-28T15:23:11+08:00; FI"length; Fi‹I"digest; F"%e6a84a11414f84e9a422138a596ea078I"source; FI"‹'use strict';
+mtime; FI"2013-08-04T17:37:18+08:00; FI"length; FiI"digest; F"%2e9ea927a6858d188f367a468d77a884I"source; FI"'use strict';
function ApiController($scope, $http, $location) {
$scope.rootUrl = '/api'
$scope.goTo = function(url, fromRel) {
@@ -14,10 +14,17 @@
$scope.fromRel === 'edit-form' ? put() : post()
}
$scope.destroy = destroy
+ $scope.$watch(function() {
+ return $location.url();
+ }, function(url, oldUrl) {
+ if(url !== oldUrl)
+ get(url)
+ });
+
get($scope.rootUrl)
// helpers
function get(url) {
@@ -42,11 +49,11 @@
error(responseHandler)
}
function put() {
$scope.loading = true
- $http.put($scope.collection.href, formData()).
+ $http.put($location.url(), formData()).
success(responseHandler).
error(responseHandler)
}
function formData() {
@@ -62,7 +69,7 @@
$scope.loading = false
}
}
ApiController.$inject = ['$scope', '$http', '$location'];
-; FI"dependency_digest; F"%b83f49b2f2033d566397a6a01b8273c8I"required_paths; F[I"ƒ/Users/weilu/workspace/collection-json-browser/app/assets/javascripts/collection_json_browser/angular/controllers/api_controller.js; TI"dependency_paths; F[{I" path; FI"ƒ/Users/weilu/workspace/collection-json-browser/app/assets/javascripts/collection_json_browser/angular/controllers/api_controller.js; TI"
-mtime; FI"2013-07-28T15:23:11+08:00; FI"digest; F"%e6a84a11414f84e9a422138a596ea078I"
_version; F"%6776f581a4329e299531e1d52aa59832
+; FI"dependency_digest; F"%8fc62ab13f0d86ee05205f13d5984a9cI"required_paths; F[I"ƒ/Users/weilu/workspace/collection-json-browser/app/assets/javascripts/collection_json_browser/angular/controllers/api_controller.js; TI"dependency_paths; F[{I" path; FI"ƒ/Users/weilu/workspace/collection-json-browser/app/assets/javascripts/collection_json_browser/angular/controllers/api_controller.js; TI"
+mtime; FI"2013-08-04T17:37:18+08:00; FI"digest; F"%2e9ea927a6858d188f367a468d77a884I"
_version; F"%6776f581a4329e299531e1d52aa59832
\ No newline at end of file