Skip to content

route_path helper not available to overrides #290

@techgique

Description

@techgique

Will and Erin have both recently worked on overrides for search interface partials and run into a problem with the code copied from Orchid causing undefined local variable or method route_path errors. An example of this is trying to override the search box partial.

In this template, prefix_path's argument is route_path. Within the Orchid Rails engine context, this is calling a helper method: https://github.com/CDRH/orchid/blob/v3.1.1/app/helpers/orchid/application_helper.rb#L308 But this helper method isn't available when overridden from the main Rails app.

We've gotten around this by replacing route_path with just passing the default string value that the method returns "search_path" but this is confusing when creating overrides and would break use of the @route_path value it can return as well. Want to figure out how to make Orchid's helpers like this available to the main app as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions