渲染文本但仍然会丢失模板错误

时间:2010-08-13 05:31:33

标签: ruby-on-rails

def r_return

  if var
    begin
      User.transaction do
        #code here
      end
    render :text => html
    return
    rescue => e
      #rescue here
    end
  else
    redirect_to root_path
  end
  #it has to been render at the end?
  #render :text => html
end

我的代码出了什么问题?不能把它变成一个开始...结束块?或者我失踪的东西?

1 个答案:

答案 0 :(得分:0)

似乎在开始救援区被抛出异常。