2011-02-23 47 views
0

使用Restful Authentication(https://github.com/technoweenie/restful-authentication),是否有一個API用於添加到Rails項目中的所有方法?在Rails中,Restful Authentication的「API」是什麼?

到目前爲止,我發現

current_user # returns a User object of current logged in user, nil if none 
logged_in? # returns true/false whether there is a logged in user 
before_filter :login_required # if no logged in user, redirects to the login page 

是否有方法/ API的完整列表可用?在過去,我們總是有一個我們可以調用的方法/函數的完整列表,但有時在Rails中,我發現信息有點散亂。

回答

0

我已經使用了Restful-Authentication,Authlogic和Devise。根據鐵路社區的反饋,我會鼓勵你看看Devise。最近,我將使用Restful-Authentication的Rails 1.2.5應用程序之一轉換爲使用Devise的Rails 3.x應用程序。使用Devise比Restful-Authentication容易得多。 (我知道這並不回答你的直接問題,但我希望有人告訴我,當我做我的選擇。)

相關問題