Skip to content

Commit

Permalink
Merge pull request #266 from sagarpreet-chadha/patch-1
Browse files Browse the repository at this point in the history
Make "maps by region" readable in JSON API #251
  • Loading branch information
jywarren authored May 29, 2018
2 parents ad22d8c + 791a406 commit 5b93f6a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/controllers/maps_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ def region
@title = "Maps in #{area}"
ids = Map.bbox(params[:minlat],params[:minlon],params[:maxlat],params[:maxlon]).collect(&:id)
@maps = Map.where(password: '').where('id IN (?)',ids).paginate(:page => params[:page], :per_page => 24)
render "maps/index", :layout => "application"
respond_to do |format|
format.html { render "maps/index", :layout => "application" }
format.json { render :json => @maps }
end
end

# list by license
Expand Down

0 comments on commit 5b93f6a

Please sign in to comment.