Skip to content

Path helper methods not found inside the pack on rails 8 #96

Closed as not planned
@matmorel

Description

@matmorel

Hello, thank you for creating this gem!

I'm trying it with rails 8.0.0.beta1 and it seems that routes defined in the packs aren't available inside it while they are in the main app:

# packs/my_pack/config/routes
scope module: :my_pack do
  resource :book
end
<%# packs/my_pack/app/views/my_pack/books/new.html.erb %>
<%= form_with url: book_path do |form| %> <%# undefined local variable or method `book_path' %>
  <%= form.text_field :title %>
<% end %>
# config/routes.rb
Rails.application.routes.draw do
  draw(:my_pack)
end
<%# app/views/home/show.html.erb %>
<%= link_to "new book", new_book_path %> <%# works %>

Metadata

Metadata

Assignees

No one assigned

    Labels

    StalequestionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions