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
15 render :text => way.id
17 render :nothing => true, :status => 500
21 render :nothing => true, :status => 400 # if we got here the doc didnt parse
26 render :nothing => true, :status => 500 # something went very wrong
30 unless Way.exists?(params[:id])
31 render :nothing => true, :status => 404
35 way = Way.find(params[:id])
40 render :nothing => true, :status => 410
43 render :text => way.to_xml.to_s
47 render :nothing => true, :status => 410