summaryrefslogtreecommitdiff
path: root/app/controllers/api/v1
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-11-22 21:19:09 -0700
committermo khan <mo@mokhan.ca>2014-11-22 21:19:09 -0700
commitd0906c67e08b3eba06121e63ecb1717c513ea50e (patch)
treeea40d2a2c0064cbf0857384757e21c6507ca14cf /app/controllers/api/v1
parentc9b162dc34e6c3685f26e08c4c994d06f32264ab (diff)
restrict the number of tutorials that can be fetched at once.
Diffstat (limited to 'app/controllers/api/v1')
-rw-r--r--app/controllers/api/v1/tutorials_controller.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/controllers/api/v1/tutorials_controller.rb b/app/controllers/api/v1/tutorials_controller.rb
index c257f707..a264a09b 100644
--- a/app/controllers/api/v1/tutorials_controller.rb
+++ b/app/controllers/api/v1/tutorials_controller.rb
@@ -1,10 +1,8 @@
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