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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update editor_controller.rb #11507

Merged
merged 2 commits into from
Oct 31, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions app/controllers/editor_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ def rich
@main_image = Image.find_by(id: params[:main_image]).path
end

if params[:tags]&.include? "lat:" and params[:tags]&.include? "lon:"
if params[:tags]&.include?('lat:') && params[:tags]&.include?('lon:')
tags = params[:tags].split(',')
tags.each do |x|
x.include? "lat:" and (@lat = x.split(':')[1])
x.include? "lon:" and (@lon = x.split(':')[1])
x.include? "zoom:" and (@zoom = x.split(':')[1])
x.include? "lat:" && (@lat = x.split(':')[1])
AlphaRomeoMike marked this conversation as resolved.
Show resolved Hide resolved
x.include? "lon:" && (@lon = x.split(':')[1])
AlphaRomeoMike marked this conversation as resolved.
Show resolved Hide resolved
x.include? "zoom:" && (@zoom = x.split(':')[1])
AlphaRomeoMike marked this conversation as resolved.
Show resolved Hide resolved
end
end

Expand Down