I have a view that displays multiple images and those images' associated tags. I decided to use a partial view for each image and its tags, but I am having trouble passing in the image object into the partial view. Here is the main view's relevant code: <table> <% @images.each do |i| %> <tr> <%= render :partial => :image_tag, :image => i %> </tr> <% end %> </table> Here is the partial view's relev
Download Editors Development Before we start this tutorial, I want to make one thing clear. After you look at this, go and convert one of your ERB files to Haml. Just try it. Just take the file and start hitting delete. You don't have to keep the file if you don't like it, but after you're done with this tutorial, just try one file. Haml feels odd for the first 20 minutes, but then after that you
!!! %html %head %body / 一行コメント / 改行&インデントでコメントも入れ子になります。 改行&インデントでコメントも入れ子になります。 -# HTML出力されないコメント -# HTML出力されないコメント HTML出力されないコメント 上記Hamlをコンパイルすると下記HTMLに出力されます。 <!DOCTYPE html> <html> <head> </head> <body> <!-- 一行コメント --> <!-- 改行&インデントでコメントも入れ子になります。 改行&インデントでコメントも入れ子になります。 --> </body> </html> コメントもタグ同様にインデントで入れ子構造になり複数行コメントが記述できます。
I have problem with <pre>, here is my code, and the screenshot is attached below. How to remove the indents? %pre.code :escaped <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head></head> <body> <form> <input type="text" name="empID" /> <input type="submit"/> </form> </body> </html>
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く