Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #4 from maxstudener/master

Bug fix for saving relations
  • Loading branch information...
commit 43a0067735d6fa037797d0d2932f3a32645dd59f 2 parents 002d983 + 6f2201e
@K-Y-L-E K-Y-L-E authored
View
2  app/views/relations/edit.html.erb
@@ -240,6 +240,6 @@
<hr/>
</div>
</div>
-<input type='button' value='Create Relation' class='btn btn-primary' ng-click='createRelation()'/>
+<input type='button' value='Update Relation' class='btn btn-primary' ng-click='createRelation()'/>
</div>
<br /><br />
View
2  public/javascripts/controllers/relations-edit.js
@@ -204,7 +204,7 @@ function relationsController($scope, $http, $rootScope, $log, $location) {
$scope.createRelation = function () {
$log.warn($scope.relation);
- $http.post($scope.url, { relation: $scope.relation }).success(function (data, status, headers, config) {
+ $http.put($scope.url, { relation: $scope.relation }).success(function (data, status, headers, config) {
$log.warn(data);
$scope.message = 'There relation saved.'
$scope.messageClass = 'success';
Please sign in to comment.
Something went wrong with that request. Please try again.