我試圖做一個簡單的用戶認證系統爲我的網站,但我不斷收到此錯誤信息:意外tIDENTIFIER
C:/用戶/克里斯/文檔/德保羅/ IT 231 /巧克力/應用/controllers/simplelogin_controller.rb:8:語法錯誤,意外的tIDENTIFIER,期待keyword_then或';'或'\ n'... name(name_out)redirect_to maintenance_chkmaintenance_p ... ...^C:/ Users/Chris/Documents/DePaul/IT 231/chocolate/app/controllers/simplelogin_controller.rb:11:語法錯誤,意外keyword_end,預計年底$結束結束結束^
這裏是我的控制器:
Class SimpleloginController < ApplicationController
def namein
end
def transmain
@familyname_out = params[:family_name_in] #textbox name from the input file
name_out = params[:family_name_in]
if found = Family.find_by_name(name_out)
redirect_to maintenance_chkmaintenance_path :notice => "Logged in successfully"
else
redirect_to simplelogin_namein_path :notice => "Invalid login. Try again"
end
end
end
任何想法?
你的救星謝謝你 – user3281827