Skip to content

Commit

Permalink
Update editor_controller.rb
Browse files Browse the repository at this point in the history
Removed 'and', replaced the logic with double ampersand
This PR closes #11502
  • Loading branch information
AlphaRomeoMike authored Oct 18, 2022
1 parent a5d2483 commit 07ed51d
Showing 1 changed file with 4 additions and 4 deletions.
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])
x.include? "lon:" && (@lon = x.split(':')[1])
x.include? "zoom:" && (@zoom = x.split(':')[1])
end
end

Expand Down

0 comments on commit 07ed51d

Please sign in to comment.