Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
メソッドを使用して、以下の haml コードを再現したいと考えていますhaml_tag。
haml_tag
= %img { alt:'Hi' , src: 'hi.jpg' }
誰でも助けることができますか?
いや..私はそれを実現しました。そこに行きます:
- haml_tag :img, { alt:'Hi' , src: 'hi.jpg' }
-の代わりにの詳細に注意してください=。haml_tagメソッドは、haml モデルに直接報告します。
-
=
思ったより簡単。:)