ruby-china/ruby-china — pull request #339 by suffering (2014-08-18 03:26:55+00:00)
Title: 支持Topic编辑

添加topics/:id/edit支持. rubychinaspa中的使用方式如下:
```javascript
rubychinaControllers.controller("TopicEditCtrl", ['$scope', 'Photo', '$location', '$routeParams', 'Topic',
function TopicEditCtrl($scope, Photo, $location, $routeParams, Topic){
$scope.topic = Topic.get({id: $routeParams.id})
var dealTopic = function(){
$scope.topic.$save(
function(successResult) {
console.log("/topics/" + successResult.id)
$location.path("/topics/" + successResult.id)
},
function(errorResult) {
if(errorResult.status === 404) {
alert('some wrong ')
}
}
);
}
$scope.createTopic = dealTopic;
}
]);
```