- render :nothing, :status => :bad_request
- end
- else
- render :nothing, :status => :forbidden
- end
- rescue ActiveRecord::RecordNotFound
- render :nothing => true, :status => :not_found
- end
-
- def make_public
- trace = Trace.find(params[:id])
-
- if @user and trace.user == @user
- if request.post? and !trace.public?
- trace.public = true
- trace.save
- flash[:notice] = 'Track made public'
- redirect_to :controller => 'trace', :action => 'view', :id => params[:id]
- else
- render :nothing, :status => :bad_request