Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Succeed helper outside of the ActionView #1159

@Kayne

Description

@Kayne

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions