-
-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow context to be set via
call
(#821)
This PR is doing more than one thing 🙈 If you want me to split this up, let me know. But in addition to allowing `context` to be passed via `call`, I've also moved where `view_context` is stored. It's now inside of the `Phlex::Context` instead of in an ivar of SGML. I think that ultimately, `view_context` as a concept can be fully removed from Phlex, and only defined in phlex-rails which is the only place it gets used. But as I went down that path the changes got more and more complicated. `phlex-rails` then needs to redefine `call`, which means it needs to be tightly coupled to `phlex`'s definition of `call`... it got messy. Let me know what you think, and if you want me to leave `@_view_context` alone, that's fine too. I'll open a sibling PR over on phlex-rails to coincide with this change.
- Loading branch information
1 parent
dc1248a
commit 960ad5a
Showing
2 changed files
with
12 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters