我在模型中有这个部分:
更新了07-25
if sign_on.acctypw1.strip == "DS" or sign_on.acctypw1.strip == "DSD"
rec = SignOn.find_by_userw1!(login)
webid = rec.prfdstw1
end
weboel23 = Weboel23.first(:conditions => {:act223 => webid}, :select => "emal23")
approval0=Weboel23.find_by_account0(!webid)
approval1=Weboel23.find_by_account1(!webid)
approval2=Weboel23.find_by_account2(!webid)
approval3=Weboel23.find_by_account3(!webid)
approval4=Weboel23.find_by_account4(!webid)
此代码似乎确实有效:
sign_on.acctypw1.strip == "DSD"
此代码似乎无法运行:
webid = rec.prfdstw1 weboel23 = Weboel23.first(:conditions => {:act223 => webid}, :select => "emal23") approval0=Weboel23.get_email_by_account0(webid)
approval1=Weboel23.get_email_by_account1(webid) approval2=Weboel23.get_email_by_account2(webid)
approval3=Weboel23.get_email_by_account3(webid) approval4=Weboel23.get_email_by_account4(webid)
时:
sign_on.acctypw1.strip == "DS"
它会运行并返回正确的结果。我需要两个案例来执行。任何想法??