summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2014-02-20 18:52:21 -0700
committermo khan <mo@mokhan.ca>2014-02-20 18:52:21 -0700
commitb6635fb14d7935992aa004a477ac877804675794 (patch)
tree1758aadace34794f33fd3f407393fd8230a64fd8 /app/controllers
parent4f506a2366115e61c6f0cbb5ae154e2555b9d1ca (diff)
use named parameters for better readability and ensure a json response is returned.
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/v1/licenses_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/v1/licenses_controller.rb b/app/controllers/v1/licenses_controller.rb
index d8c16b6..36ae54c 100644
--- a/app/controllers/v1/licenses_controller.rb
+++ b/app/controllers/v1/licenses_controller.rb
@@ -4,8 +4,8 @@ class V1::LicensesController < ApplicationController
before_filter :prepare_pagination
def index
- @licenses = License.most_recent(@page, @per_page)
- render nothing: true
+ @licenses = License.most_recent(page: @page, per_page: @per_page)
+ render json: @licenses
end
private