Commit fcedb1c1

mo khan <mo@mokhan.ca>
2015-01-11 15:21:34
extract parameter.
1 parent c32fb64
Changed files (1)
app
controllers
app/controllers/api/v2/categories_controller.rb
@@ -1,8 +1,8 @@
 module Api
   module V2
     class CategoriesController < ApplicationController
-      def show
-        @category = @categories.find(params[:id])
+      def show(id = params[:id])
+        @category = @categories.find(id)
       end
     end
   end