Skip to content

Instantly share code, notes, and snippets.

@darui00kara
Created May 27, 2015 08:07
Show Gist options
  • Select an option

  • Save darui00kara/9338de4877a2a45e47cb to your computer and use it in GitHub Desktop.

Select an option

Save darui00kara/9338de4877a2a45e47cb to your computer and use it in GitHub Desktop.
!!!
%html{:lang => "ja"}
%head
%title= @title
%meta{:content => "text/html", :"http-equiv" => "Content-Type", :charset => "utf-8"}
%body
%h1 #{@title}
%h2 Comment Write
%form{:method => "POST", :action => '/write_comment'}
%input{:type => "hidden", :name => "_method", :value => "PUT"}
%table
%tr
%td Your Name
%td
%input{:type => "text", :name => "name"}
%tr
%td Title
%td
%input{:type => "text", :name => "title"}
%tr
%td Comment
%td
%input{:type => "text", :name => "message"}
%tr
%td
%td
%input{:type => "submit", :value => "Comment"}
%input{:type => "reset", :value => "Reset"}
%h2 Comments List
%table{:border => "1", :bordercolor => "#000000"}
%tr
%th Name
%th Title
%th Comment
- @comments_data.each do |comment|
%tr
%td= comment[:name]
%td= comment[:title]
%td= comment[:comment]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment