如何在Rails的命名空间中生成控制器


Answers:


316

尝试rails g controller admin/users是否要usersadmin名称空间中包含控制器。当然,请users与您想要的任何控制器名称交换。



15

如果要生成它:

rails generate controller namespace_name/controller_name

如果要回滚此步骤,请使用:

rails destroy controller namespace_name/controller_name
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.