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
Fix and cleanup output handlers #1441
Conversation
@ujifgc Thank you! +1 BTW, do we have to rewrite padrino-admin templates of slim? |
Yes, padrino-admin pages are broken at this PR. |
I fixed the broken templates. |
Nice job @ujifgc and @namusyaka! really glad to see this cleanup. template handling, especially with capture has been half-broken for a long time now. Good to see this getting solidified for 0.12 |
Indeed awesome work guys. Keep going. |
The last commit 80a0e24 disables concatenating of If we decide we could implement a flag to enable legacy behavior of Padrino template handlers and concatenate on If some legacy app wants to keep wrong behavior, the monkey patch would be: For HamlHandler: class Padrino::Helpers::OutputHelpers::HamlHandler
def concat_to_template(text="")
template.haml_concat(text)
nil
end
end For SlimHandler: class Padrino::Helpers::OutputHelpers::SlimHandler
def concat_to_template(text="")
self.output_buffer << text
nil
end
end Please, check your apps with this PR and comment. I think, it's ready. |
If I understand correctly it means almost every padrino app using forms will need to tweak every |
Yep. A tweak of template block helpers from |
Yeah, we should document the monkeypatch in the blog post for 0.12.0 release (#1019) |
I think the breaking change makes a lot of sense towards readability and predictability of the code going further. Excellent job guys! :) Thanks so much!! |
Fix and cleanup output handlers
Warning: this disables concatenating of
-
in Slim and Haml templates #1441 (comment).