【发布时间】:2016-01-11 21:41:02
【问题描述】:
我收到一个错误没有路线匹配 [GET],因为尝试为每个控制器创建文件夹
这里是应用结构:
|controller,helper,view|
|user_management| ------> FOLDER
|user| ------> SUBFOLDER
|login| ------> SUBFOLDER
|chat| ------> SUBFOLDER
|sale_management| ------> FOLDER
|sale| ------> SUBFOLDER
|product| ------> SUBFOLDER
这里的控制器:
# UserManagement Controllers
class UserManagement::UserController < ApplicationController
class UserManagement::LoginController < ApplicationController
class UserManagement::ChatController < ApplicationController
# SaleManagement Controllers
class SaleManagement::SaleController < ApplicationController
class SaleManagement::ProductController < ApplicationController
这里的助手:
module UserManagement::UserHelper
module UserManagement::LoginHelper
module UserManagement::ChatHelper
module SaleManagement::SaleHelper
module SaleManagement::ProductHelper
来自 rails 2.3 和 ruby 1.8 的 Router.rb
map.root :controller => "user_management/user", :action=>"index"
map.connect ':controller/:action/:id'
map.connect ':controller/:action/:id.:format'
我正在使用 rails 3 和 ruby 1.9 中的 Routes.rb 但得到 ROUTES ERROR
root :to => 'user_management/user#index'
match ':controller(/:action(/:id))(.:format)'
有人可以帮助我吗?
【问题讨论】:
标签: ruby-on-rails ruby ruby-on-rails-3 ruby-1.9.3