Using `partial.helpers` causes issues with code reloading
Opened this issue · 1 comments
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:
- Clone this repo: https://github.com/grncdr/nice_partials_issue, this is just a standard
rails new
+bundle add nice_partials
- Checkout the
issue-101
branch. bundle install && rails server
- Open localhost:3000
- 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
- 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.
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.