Do you mean you want to put the parameters hash directly into the attributes hash of the input?
On Tue, Nov 9, 2010 at 7:59 PM, Zhi-Qiang Lei <[email protected]>wrote: > I had read the reference. But the idea still puzzles me. If I store the > custom hash in a variable, how do I make the variable to be the attributes > of input element? > > On Nov 10, 2010, at 3:00 AM, Nathan Weizenbaum wrote: > > The > reference<http://haml-lang.com/docs/yardoc/file.HAML_REFERENCE.html#ruby_blocks>explains > how to run Ruby code in Haml. > > On Tue, Nov 9, 2010 at 8:59 AM, Zhi-Qiang Lei <[email protected]>wrote: > >> Dear All, >> >> I have a input element in my application. >> >> %input#pending{:type => 'checkbox', :name => 'status[]', :value => >> 'pending', :checked => 'checked'} >> >> I want to control it with params. The aim is to display it only if params >> contain the relative value. How do I do this in haml? Thanks in advance. >> >> Best regards, >> Zhi-Qiang Lei >> [email protected] >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Haml" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected] <haml%[email protected]>. >> 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/haml?hl=en. > > > > Best regards, > Zhi-Qiang Lei > [email protected] > > -- > You received this message because you are subscribed to the Google Groups > "Haml" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected] <haml%[email protected]>. > 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/haml?hl=en.
