【发布时间】:2011-03-31 11:49:46
【问题描述】:
我有一个嵌套资源hotel_user,我希望在酒店命名空间下拥有hotel_users_controller。
我想在这里使用 RESTful 身份验证,并且我希望酒店目录中的hotel_users_controller、sessions_controller 像hotel/hotel_users_controller 和hotel/sessions_controller。我在终端中尝试了以下命令,但失败了。
script/generate authenticated hotel_user hotel/session
它因错误而失败
The name 'AuthenticatedSystem' is either already used in your application or reserved by Ruby on Rails.
Please choose an alternative and run this generator again.
authenticated_system.rb 文件存在于 lib 目录下的某些其他资源,而不是 hotel_user。生成器看到它并且无法生成文件。我能做些什么?请帮忙
【问题讨论】:
-
FWIW,我的 Ruby 和 Rails 朋友告诉我“没有人再使用 restful-authentication”,而是使用更新的插件,如 Authlogic、cancan 等。
标签: ruby-on-rails restful-authentication