doximity / doximity/rake-ui

Loading problems with helpers

Open
#42 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Ruby
Stars
54
Forks
12
Avg merge
1h 25m
Merged PRs (30d)
2

Description

I added the library to the project and when I opened at the first time after loading a server a page `/rake-ui` and then try to open a page with code like that `link_to(link_params)` it raises an error
```
arguments passed to url_for can't be handled. Please require routes or provide your own implementation
```
but if I tried to open a page from the project after loading the project and then opened `/rake-ui` it works fine

I checked the path of invoking the function `url_for` and discovered that if you go through the first scenario it looks like
```
From: ../gems/actionview-5.2.8.1/lib/action_view/helpers/url_helper.rb:32:
Owner: ActionView::Helpers::UrlHelper
Visibility: public
Signature: url_for(options=?)
Number of lines: 11
```
and in the second scenario
```
From: ../gems/actionview-5.2.8.1/lib/action_view/routing_url_for.rb:7:
Owner: ActionView::RoutingUrlFor
Visibility: public
Signature: url_for(options=?)
Number of lines: 42
```
I tried to force my app to load these files in the `ApplicationHelper` this way
```
module ApplicationHelper
include ActionView::Helpers::UrlHelper
```
and that way
```
module ApplicationHelper
include Rails.application.routes.url_helpers
```

but it didn't work anyway

Rails: 5.2.8.1
Rake: 13.0.6
Rake-ui: 0.1.0

Ruby: ruby 2.7.5p203 (2021-11-24 revision f69aeb8314) [x86_64-darwin21]
OS: MacOS 13.4.1 (22F82)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.