Ruby on Rails view helper equivalent

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Ruby on Rails view helper equivalent

desoleary
Wondering if there exists an equivalent to Ruby on Rails view helpers that allow for the creation of helpers to encapsulate view logic to allow for much better testability; aside any decorator frameworks to encapsulate view logic associated with domain model classes
Reply | Threaded
Open this post in threaded view
|

Re: Ruby on Rails view helper equivalent

danielfernandez
Administrator
I'm not really aware of how Ruby view helpers work, but you can create view layer fragments in thymeleaf which you can include in other pages as many times as you want (see http://www.thymeleaf.org/doc/html/Using-Thymeleaf.html#template-layout ) and also test these fragments with the new testing library: https://github.com/thymeleaf/thymeleaf-testing