LoginSignup
18

More than 5 years have passed since last update.

posted at

Hamlのサンプル(フォーム)

index.haml
!!!
%html
    %body
        %form{:action => "/", :method => "post"}
            Title:
            %input{:name => "title", :size => "40"}
            %br
            URL:
            %input{:name => "url", :size => "80", :value => "http://"}
            %br
            %input{:type => "submit", :value => "send"}
        - @bookmarks.each do |bookmark|
            %div
                %a{:href => bookmark['url']}= h bookmark['title']
            - unless bookmark['title'] == ''
                %hr
        %div#record 登録数#{@now_rec}
        %div#page #{@paging}

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
What you can do with signing up
18