Предположим, что у меня есть контроллер, расположенный в /admin/users/users_controller.rb
:Название конвенции для возвращенных файлов в контроллерах
class Admin::UsersController < ApplicationController
def index
#..........
respond_to do |format|
format.html # the file /admin/users/index.html.haml will be returned implicitly
format.js # the file /admin/users/index.js.erb will be returned implicitly
end
end
end
routes.rb
namespace :admin do
resource :users do
collection do
resources :tags, controller: :users_tags
end
end
end
Если у меня есть контроллер UsersTagsController
в том же каталоге:
class Admin::UsersTagsController < ApplicationController
def index
#..........
respond_to do |format|
format.html # what file will be returned?
format.js # what file will be returned?
end
end
end
S o какой файл будет возвращен в этом случае?
Почему вы не запустить его и получить доступ к действия в вопросе и посмотреть, какой файл он жалуется на отсутствие? –
@AndrewMarshall из-за лености. –