diff options
| author | mo k <mo@mokhan.ca> | 2012-10-04 07:54:31 -0600 |
|---|---|---|
| committer | mo k <mo@mokhan.ca> | 2012-10-04 07:54:31 -0600 |
| commit | eea6dc5783a8474a9af9db81910eae466870ad10 (patch) | |
| tree | 18d4e33d29917b23616e261d50bfc29993ec9705 /app/controllers/tutorials_controller.rb | |
| parent | ad246d65078574f7fab24f941f64754d2e2a0871 (diff) | |
add paging to the tutorials listing page.
Diffstat (limited to 'app/controllers/tutorials_controller.rb')
| -rw-r--r-- | app/controllers/tutorials_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/tutorials_controller.rb b/app/controllers/tutorials_controller.rb index a47ad899..377827c2 100644 --- a/app/controllers/tutorials_controller.rb +++ b/app/controllers/tutorials_controller.rb @@ -5,7 +5,7 @@ class TutorialsController < ApplicationController if params[:tags] @tutorials = Tutorial.tagged_with([params[:tags]]) else - @tutorials = Tutorial.all.reverse + @tutorials = Tutorial.page(params[:page]).per(15) end end |
