Skip to content

Commit

Permalink
Update editor_controller.rb (#11507)
Browse files Browse the repository at this point in the history
* Update editor_controller.rb

Removed 'and', replaced the logic with double ampersand
This PR closes #11502

* Update app/controllers/editor_controller.rb

Co-authored-by: Tilda Udufo <mathildaudufo@gmail.com>

Co-authored-by: Tilda Udufo <mathildaudufo@gmail.com>
  • Loading branch information
AlphaRomeoMike and TildaDares authored Oct 31, 2022
1 parent affe0fc commit 7aadb93
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 7aadb93

Please sign in to comment.