Как мне сделать вложенные маршруты has_one в ActiveAdmin?
class Parent
has_one :child
end
class Child
belongs_to :parent
end
# ActiveAdmin:
ActiveAdmin.register Parent do
end
ActiveAdmin.register Child do
belongs_to :parent, optional: true
end
resources :parents do
resources :child # Singular
end
Используемый мной маршрут edit_parent_child_path(parent, child)
Я получаю ошибку ActionController::RoutingError (uninitialized constant ChildController
Но если я сохраню маршрут в Plural, я получу: No Method Error, undefined method child for Parent
Так как мне сделать вложенные отношения has_one в ActiveAdmin?