假設require_role ["alt", "student worker"], :except => [:list, :show, :index, :create]
工作在這種方法之外,我在這裏做錯了什麼?當我調用它的方法時,它是一個promo_site? (true),但是當它是false時,該方法失敗。簡單的紅寶石,除非方法錯誤,ROR
def check_if_role_is_required
require_role ["alt", "student worker"], :except => [:list, :show, :index, :create] unless promo_site?
end
在約翰尼拉5的話說:「需要更多的投入「。代碼位於您的應用程序中的哪個位置?哪種方法會給你一個錯誤?什麼是錯誤? – EmFi 2010-02-12 05:33:40