diff options
| author | mo khan <mo@mokhan.ca> | 2014-11-22 09:31:55 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-11-22 09:31:55 -0700 |
| commit | 31b5a3cf55d273dfc93385be8cf28ce1f8f8abd2 (patch) | |
| tree | d39963b8f893fbfd86b3a772a4805e7a84cfd5b2 /app/controllers/api | |
| parent | 4454bd91253ae68108ddc5f79d73b544e6c8a524 (diff) | |
add tutorial show route.
Diffstat (limited to 'app/controllers/api')
| -rw-r--r-- | app/controllers/api/v2/tutorials_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/api/v2/tutorials_controller.rb b/app/controllers/api/v2/tutorials_controller.rb index 6b4279b6..b72321b2 100644 --- a/app/controllers/api/v2/tutorials_controller.rb +++ b/app/controllers/api/v2/tutorials_controller.rb @@ -4,6 +4,10 @@ module Api def index @tutorials = Tutorial.page(page).per(per_page) end + + def show(id = params[:id]) + @tutorial = Tutorial.find(id) + end end end end |
