【问题标题】:RAILS: Authlogic gem & Userstamp pluginRAILS:Authlogic gem 和 Userstamp 插件
【发布时间】:2009-06-16 08:56:59
【问题描述】:

我有一个使用 Authlogic gem 的应用程序并需要该功能 Userstamp plugin 的。

AFAIK UserstampRestfulAuthentication 配合得非常好,但我找不到任何提及将它与 Authlogic 一起使用的内容。

你们中有人尝试过将它们结合起来吗?有没有我应该注意的问题?我应该使用完全不同的插件/gem 来获得 UserstampAuthlogic 的功能吗?

非常感谢您的帮助!

【问题讨论】:

    标签: ruby-on-rails authlogic


    【解决方案1】:

    好吧,我只是很难找到它。 ;-)

    如果您将 Authlogic (2.0.11) 与 Userstamp (2.0) 结合使用,请确保 ActionController 中 Authlogic 的 current_user 方法是 protected 而不是 private(默认情况下)。或者您会在 User sessionsController#new 中得到 NoMethodError。

    除此之外,它就像一个魅力。

    P.S.:不需要在 ActionController 中手动实现 set_stamper 方法。 Authlogic 和Userstamp 与Userstamp 插件定义的方法配合得很好。如果你不知道我在说什么,请忽略这个。 :-)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-07-28
      • 1970-01-01
      • 2011-10-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多