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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delegate valid_encoding? for ActionView::OutputBuffer #45673

Closed
wants to merge 1 commit into from
Closed

Delegate valid_encoding? for ActionView::OutputBuffer #45673

wants to merge 1 commit into from

Conversation

enriikke
Copy link
Contributor

Summary

Adds ActionView::OutputBuffer#valid_encoding? as a delegated method.

ActionView::OutputBuffer used to inherit from ActiveSupport::SafeBuffer, which itself inherits from String, so it used to expose all public String methods. This was refactored as part of #45614, however I don't think that leaving out some string methods was intentional (it already delegates some of them).

We have encoding validation checks at GitHub so I think exposing what the encoding is (encoding) and whether it's valid (valid_encoding?) would be reasonable and something we need. 馃槂

Signed-off-by: Enrique Gonzalez <enriikke@gmail.com>
@rails-bot rails-bot bot added the actionview label Jul 27, 2022
@enriikke
Copy link
Contributor Author

Working through this a bit more and I think we could find a different way to approach it without having to add another delegated method here, specially since this is meant to be an internal class anyway! 馃槃

@enriikke enriikke closed this Jul 28, 2022
@enriikke enriikke deleted the output-buffer-delegation branch July 28, 2022 22:45
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