Skip to content

Commit

Permalink
Improve comment, include in edit_and_update
Browse files Browse the repository at this point in the history
  • Loading branch information
nimmolo committed Aug 9, 2024
1 parent b72607b commit fd1882c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions app/controllers/concerns/locationable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ module Locationable
extend ActiveSupport::Concern

included do
# By now we have an object ivar, and maybe a "-1" location_id, indicating a
# new Location if accompanied by bounding box lat/lng. If the location name
# does not exist already, and the bounding box is present, create a new
# @location, and associate it with the @object.
# By now we should have an object (pass the ivar!), and maybe a "-1"
# location_id, indicating a new Location if accompanied by bounding box
# lat/lng. If the location name does not exist already, and the bounding box
# is present, create a new @location, and associate it with the @object.
def create_location_object_if_new(object)
# Resets the location_id to MO's existing Location if it already exists.
return false if place_name_exists?(object)
Expand Down
1 change: 1 addition & 0 deletions app/controllers/observations_controller/edit_and_update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
module ObservationsController::EditAndUpdate
include ObservationsController::SharedFormMethods
include ObservationsController::Validators
include ::Locationable

# Form to edit an existing observation.
# Linked from: left panel
Expand Down

0 comments on commit fd1882c

Please sign in to comment.