1 class WayController < ApplicationController
4 before_filter :authorize
8 way = Way.from_xml(request.raw_post, true)
11 way.user_id = @user.id
12 if way.save_with_history
13 render :text => way.id
15 render :nothing => true, :status => 500
19 render :nothing => true, :status => 400 # if we got here the doc didnt parse
24 render :nothing => true, :status => 500 # something went very wrong
28 unless Way.exists?(params[:id])
29 render :nothing => true, :status => 404
33 way = Way.find(params[:id])
38 render :nothing => true, :status => 410
41 render :text => way.to_xml.to_s
45 render :nothing => true, :status => 410