openstreetmap-website

https://github.com/openstreetmap/openstreetmap-website

Ruby

The Rails application that powers OpenStreetMap

AmfController#getway_history

Find history of a way.
Returns 'way', id, and an array of previous versions:
- formerly [old_way.version, old_way.timestamp.strftime("%d %b %Y, %H:%M"), old_way.visible ? 1 : 0, user, uid]
- now [timestamp,user,uid]

Heuristic: Find all nodes that have ever been part of the way;
get a list of their revision dates; add revision dates of the way;
sort and collapse list (to within 2 seconds); trim all dates before the
start date of the way.

Source | Google | Stack overflow

Edit

git clone [email protected]:openstreetmap/openstreetmap-website.git

cd openstreetmap-website

open app/controllers/amf_controller.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-AmfController-getway_history-for-pr


# Commit to git

git add app/controllers/amf_controller.rbgit commit -m "better docs for AmfController#getway_history"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-AmfController-getway_history-for-pr

hub pull-request


# Celebrate!