On Sun, Nov 9, 2008 at 8:00 PM, Richard Fairhurst <[EMAIL PROTECTED]> wrote: > In the way model, what does new_way do? > > I'm slightly surprised to encounter > def delete_with_history!(new_way, user) > > when I'd have expected > def delete_with_history!(changeset) >
The controller receives a request to /way/<id> with post data being the way XML. The XML is interpreted to new_way, and contains the changeset ID and the way version number. The user passed in is the currently authorised user. delete_with_history then checks for consistency between the authorised user, the new_way's changeset, and the way version number before making any change. new_way is probably a bad var name... I'd have gone with something like xml_way, input_way, request_way etc. To replicate without XML you just need to use Way.new to create a Way object with id, changeset and version all set. Dave _______________________________________________ dev mailing list [email protected] http://lists.openstreetmap.org/listinfo/dev

