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 Haml::RailsHelpers #395

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Use Haml::RailsHelpers #395

wants to merge 1 commit into from

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

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.

None yet

1 participant