app/controllers/landable/api/directories_controller.rb in landable-1.13.1 vs app/controllers/landable/api/directories_controller.rb in landable-1.13.2
- old
+ new
@@ -1,11 +1,11 @@
-require_dependency "landable/api_controller"
+require_dependency 'landable/api_controller'
module Landable
module Api
class DirectoriesController < ApiController
def index
- ids = params[:ids] if params[:ids].present? and params[:ids].is_a? Array
+ ids = params[:ids] if params[:ids].present? && params[:ids].is_a?(Array)
ids ||= ['/']
listings = ids.map { |id| Directory.listing id }
respond_with listings
end