Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Personally I like to have little snippets like these as Slim/ERB templates and render them like partials (I have a utility class to actually do the rendering to avoid excess logging and make it easier to pass arguments and blocks to them.)

I just never liked "rendering" html elements directly in a ruby method. Feels weird, man.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: