diff options
| author | mo k <mo.khan@gmail.com> | 2014-11-22 21:35:38 -0700 |
|---|---|---|
| committer | mo k <mo.khan@gmail.com> | 2014-11-22 21:35:38 -0700 |
| commit | 7620674929c024a7279dfa116deab8805f2fb2ec (patch) | |
| tree | 38e5daa58e646a1907765def9c64d2f7a56b5fe9 /app/controllers/api/v1/tutorials_controller.rb | |
| parent | 31b5a3cf55d273dfc93385be8cf28ce1f8f8abd2 (diff) | |
| parent | 66c09b81c3a4baeb0ca39a1e87496cca53a43a7c (diff) | |
Merged in mocheen/cakeside/cake-uploads (pull request #117)
add tools to cake edit page.
Diffstat (limited to 'app/controllers/api/v1/tutorials_controller.rb')
| -rw-r--r-- | app/controllers/api/v1/tutorials_controller.rb | 5 |
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 |
