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

Make the lookup context more "read-only" #35074

Merged
merged 2 commits into from Jan 28, 2019
Merged

Make the lookup context more "read-only" #35074

merged 2 commits into from Jan 28, 2019

Conversation

tenderlove
Copy link
Member

I am trying to curb mutations so that we can more easily cache and understand relationships between objects in Action View. This PR eliminates a view_paths setter on the lookup context. I think this is safe to remove because view_paths should be set on the controller, and we still maintain that API.

We can't use the FixtureResolver as a hash key because it doesn't
implement `hash` correctly.  This commit renames the method to "data"
(which is just as unfortunately named :(  )
@rails-bot rails-bot bot added the actionview label Jan 28, 2019
The `with_fallbacks` method will temporarily mutate the lookup context
instance, but nobody can call the setter, and we don't have to do a push
/ pop dance.
@tenderlove
Copy link
Member Author

Build failures seem like network errors (trying to connect to Azure??). We should probably not be connecting to the network in test.

job 58169 5 - rails rails - travis ci 2019-01-28 13-11-57

@tenderlove tenderlove merged commit 8f8d8b3 into master Jan 28, 2019
@tenderlove tenderlove deleted the ro-lookup-context branch January 28, 2019 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant