Skip to content

Using partial.helpers causes issues with code reloading #101

Description

@grncdr

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions