Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using partial.helpers causes issues with code reloading #101

Open
grncdr opened this issue Sep 3, 2024 · 1 comment
Open

Using partial.helpers causes issues with code reloading #101

grncdr opened this issue Sep 3, 2024 · 1 comment

Comments

@grncdr
Copy link

grncdr commented Sep 3, 2024

I've been testing out nice_partials and I've noticed that if I use partial.helpers do ... end in a partial, it causes Rails development code reloading to become very unreliable.

Steps to reproduce:

  1. Clone this repo: https://github.com/grncdr/nice_partials_issue, this is just a standard rails new + bundle add nice_partials
  2. Checkout the issue-101 branch.
  3. bundle install && rails server
  4. Open localhost:3000
  5. Change the value returned on this line: https://github.com/grncdr/nice_partials_issue/blob/issue-101/app/views/pages/_test_partial.html.erb#L3
  6. Refresh your browser

Expected outcome: the content changes.
Actual outcome: the content stays the same. Refreshing a second time will show the updated content.


In my actual usage, it seems as though refreshing a second time doesn't always solve it. This gets extra confusing when you have an error, as the rails development error page will show current sources that no longer match the code that caused the error.

@kaspth
Copy link
Contributor

kaspth commented Sep 3, 2024

Huh, that's strange! I haven't seen this and I'm not sure what's causing it. Unfortunately, I don't really have to investigate further or fix these days. I don't know when that'll happen again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants