Helpers should be used to keep programming logic outside of your views. Haml is for generating markup. You can do this using normal haml syntax:
%fb:prompt-permission(perms="offline_access") Give me access chris On Sun, Feb 20, 2011 at 8:56 AM, kadoudal <kadou...@gmail.com> wrote: > I read in some forum : 'HAML is for layout !' and recommendation to > use helpers for any other purpose... > > so if I write an helper to output specific Facebook tags : > "<fb:prompt-permission perms="offline_access">Give me access</ > fb:prompt-permission>" > > something like : > = fb_prompt_permission > > in my view, and my helper being : > > module PagesHelper > def fb_prompt_permission > html = "<fb:prompt-permission perms='offline_access'" > html << "Give me access" > html << "</fb:prompt-permission>" > return html > end > end > > it's good HAML design ? > > -- > You received this message because you are subscribed to the Google Groups > "Haml" group. > To post to this group, send email to haml@googlegroups.com. > To unsubscribe from this group, send email to > haml+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/haml?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Haml" group. To post to this group, send email to haml@googlegroups.com. To unsubscribe from this group, send email to haml+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/haml?hl=en.