Created
February 15, 2015 22:41
-
-
Save silentshade/b7fee8f7fb33295bc62b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if args['polygon'].present? | |
if (num = args['polygon'].match(/^(?:\-)?\d+$/)) && num[0].to_i > 0 && Polygon.exists?(num[0]) | |
event[:polygon_id] = args['polygon'] | |
else | |
event[:declared_polygon] = args['polygon'] | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment