Skip to content

partial.helpers are shared across all partials #102

@grncdr

Description

@grncdr

I'm not sure if this is an issue or if I'm misreading the README, but from "well isolated helper methods" I expected that helpers defined with partial.helpers would only be available to the partial that defines them. Instead, it appears that helpers defined in this way are available to all partials.

To reproduce:

  1. Clone https://github.com/grncdr/nice_partials_issue
  2. Checkout the issue-102 branch
  3. bundle && rails server
  4. Open localhost:3000
  5. Observe the empty red box
  6. Uncomment this line: https://github.com/grncdr/nice_partials_issue/blob/issue-101/app/views/pages/index.html.erb#L2
  7. Refresh*
  8. Observe that the helper defined in test_partial is available on other_partial.

* - you may need to restart the server to observe the changes, see #101

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