summaryrefslogtreecommitdiff
path: root/app/controllers/api/v1/tutorials_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/api/v1/tutorials_controller.rb')
-rw-r--r--app/controllers/api/v1/tutorials_controller.rb5
1 files changed, 1 insertions, 4 deletions
diff --git a/app/controllers/api/v1/tutorials_controller.rb b/app/controllers/api/v1/tutorials_controller.rb
index c257f707..8c75dbf0 100644
--- a/app/controllers/api/v1/tutorials_controller.rb
+++ b/app/controllers/api/v1/tutorials_controller.rb
@@ -1,16 +1,13 @@
module Api
module V1
class TutorialsController < ApiController
- respond_to :json
-
def index
- respond_with(@tutorials = current_user.tutorials)
+ @tutorials = current_user.tutorials.page(page).per(per_page)
end
def create
@tutorial = current_user.tutorials.create!(tutorial_params)
current_user.tag(@tutorial, with: params[:tutorial][:tags], on: :tags)
- respond_with(@tutorial)
end
private