metamaps--metamaps/app/controllers/api/v2/maps_controller.rb

17 lines
333 B
Ruby
Raw Normal View History

2016-09-24 03:00:46 +00:00
# frozen_string_literal: true
2017-11-25 19:23:47 +00:00
module Api
module V2
2017-02-09 21:53:19 +00:00
class MapsController < WithUpdatesController
def searchable_columns
2017-11-25 19:23:47 +00:00
%i(name desc)
end
def apply_filters(collection)
collection = collection.where(user_id: params[:user_id]) if params[:user_id]
collection
end
end
end
end