ensl.org/app/controllers/api/v1/maps_controller.rb
2015-08-01 16:34:01 +01:00

17 lines
No EOL
284 B
Ruby

class Api::V1::MapsController < Api::V1::BaseController
def index
render json: { maps: gather_maps }
end
private
def gather_maps
Map.classic.basic.map do |m|
{
id: m.id,
name: m.name,
category_id: m.category_id
}
end
end
end