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

Succeed helper outside of the ActionView #1159

Open
Kayne opened this issue Apr 3, 2024 · 0 comments
Open

Succeed helper outside of the ActionView #1159

Kayne opened this issue Apr 3, 2024 · 0 comments

Comments

@Kayne
Copy link

Kayne commented Apr 3, 2024

Using succeed helper crashes during rendering outside of the ActionView. The very simple example in rails console:

content = "= succeed '.' do\r\n  blablabla1\r\n  blablabla2"
template = Haml::Template.new { content }
template.render

raises:

NoMethodError: undefined method `succeed' for #<Object:0x00000001084ef738>
from (__TEMPLATE__):1:in `__tilt_84380'

Looks like succeed helper is not accessible when using render method directly? Which does make sense, since succeed is a helper accessible in ActionView. So the question is… How to use HAML template which uses succeed helper but I need to render template in model/controller - outside of the ActionView?

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

No branches or pull requests

1 participant