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

Use Sinatra::HamlHelpers #395

Merged
merged 2 commits into from
Oct 20, 2024
Merged

Use Sinatra::HamlHelpers #395

merged 2 commits into from
Oct 20, 2024

Conversation

@dentarg
Copy link
Member Author

dentarg commented Oct 5, 2022

@dentarg
Copy link
Member Author

dentarg commented Dec 26, 2022

See also dentarg/urls@cbf62de

@dentarg
Copy link
Member Author

dentarg commented Feb 22, 2023

About Haml 5 and Rails, but a bit interesting: rails/rails#47443

@dentarg
Copy link
Member Author

dentarg commented Sep 11, 2023

Some words about alternatives to removed helpers from haml/haml@d528eec

Alternatives to the removed helpers:

  • Some simple ones could work by copying the original definition.
  • For helpers generating general HTML tags, also consider using what your framework provides, e.g. Rails content_tag.
    Same applies to capture_haml, e.g. Rails capture.
  • Ones that rely on Haml::Buffer have no direct alternative by design. They existed at the cost of performance.
    You need to define a helper, instantiate a String buffer in it, append stuff to it, and call it inside =.

@dentarg
Copy link
Member Author

dentarg commented Nov 22, 2023

Maybe the helpers can be a part of sinatra/contrib: sinatra/sinatra#1960

@dentarg dentarg changed the title Use Haml::RailsHelpers Use Sinatra::HamlHelpers Oct 20, 2024
@dentarg dentarg marked this pull request as ready for review October 20, 2024 22:11
@dentarg dentarg merged commit cf98694 into main Oct 20, 2024
7 checks passed
@dentarg dentarg deleted the haml-helpers branch October 20, 2024 22:51
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.

1 participant