我在模型中有这一部分:
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"
它将运行并返回正确的结果。我需要执行这两种情况。有任何想法吗??