around_action :api_call_handle_error
def show
- trace = Trace.visible.find(params[:id])
+ @trace = Trace.visible.find(params[:id])
- if trace.public? || trace.user == current_user
- @traces = [trace]
- render "trace"
- else
- head :forbidden
- end
+ head :forbidden unless @trace.public? || @trace.user == current_user
end
def update