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

Add safe buffer subclass which handles arrays #1

Merged
merged 4 commits into from
Jun 11, 2021

Conversation

jaredcwhite
Copy link
Contributor

This echoes similar work done to resolve camertron/rux#2.

I haven't actually tested this yet with Rails…basically just copied over work I did to get the safe buffer working in Bridgetown. If you can think of a more elegant solution, let me know!

Copy link
Owner

@camertron camertron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh so regular 'ol ActiveSupport::SafeBuffer doesn't handle arrays?

@@ -0,0 +1,13 @@
require 'rux'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably not…I noticed you had requires in some of the other files so I added it for consistency.

@jaredcwhite
Copy link
Contributor Author

Huh so regular 'ol ActiveSupport::SafeBuffer doesn't handle arrays?

It would appear not. Rux is handling things a bit differently than traditional ERB so I'm not surprised they're only thinking in terms of string expressions.

@camertron camertron merged commit 8315d05 into camertron:master Jun 11, 2021
@camertron
Copy link
Owner

Published in v1.1.0 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Looping and outputting HTML?
2 participants