Refactor controller to use respond_with.