[openstreetmap/openstreetmap-website] Microcosms microcosms (PR #3683)
Brian DeRocher
notifications at github.com
Sun Sep 18 20:39:54 UTC 2022
@openbrian commented on this pull request.
> + private
+
+ def set_microcosm
+ @microcosm = Microcosm.friendly.find(params[:id])
+ end
+
+ def microcosm_params
+ normalize_longitude(params[:microcosm])
+ params.require(:microcosm).permit(
+ :name, :location, :latitude, :longitude,
+ :min_lat, :max_lat, :min_lon, :max_lon,
+ :description
+ )
+ end
+
+ def normalize_longitude(microcosm_params)
done, as it's not specific to microcosms, I moved it to lib/osm.rb so it can be shared by any model with a longitude.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/3683#discussion_r973772558
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/3683/review/1111585318 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20220918/addd3628/attachment.htm>
More information about the rails-dev
mailing list