Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed deleted index.html mention in map controller #5206

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 0 additions & 21 deletions app/controllers/map_controller.rb
Original file line number Diff line number Diff line change
@@ -1,25 +1,4 @@
class MapController < ApplicationController
def index
@title = 'Maps'
@nodes = Node.paginate(page: params[:page], per_page: 32)
.order('nid DESC')
.where(type: 'map', status: 1)

@map_lat = nil
@map_lon = nil
if current_user&.has_power_tag("lat") && current_user&.has_power_tag("lon")
@map_lat = current_user.get_value_of_power_tag("lat").to_f
@map_lon = current_user.get_value_of_power_tag("lon").to_f
end
# I'm not sure if this is actually eager loading the tags...
@maps = Node.joins(:tag)
.where('type = "map" AND status = 1 AND (term_data.name LIKE ? OR term_data.name LIKE ?)', 'lat:%', 'lon:%')
.distinct

# This is supposed to eager load the url_aliases, and seems to run, but doesn't actually eager load them...?
# @maps = Node.select("node.*,url_alias.dst AS dst").joins(:tag).where('type = "map" AND status = 1 AND (term_data.name LIKE ? OR term_data.name LIKE ?)', 'lat:%', 'lon:%').joins("INNER JOIN url_alias ON url_alias.src = CONCAT('node/',node.nid)")
end

def show
@node = Node.find_map(params[:name], params[:date])

Expand Down
107 changes: 0 additions & 107 deletions app/views/map/index.html.erb

This file was deleted.