ますは適当にscaffold。
ruby script/generate scaffold topic title:string
app/views/layout/topics.html.haml
!!! %html %head %meta{'http-equiv' => 'content-type', :content => 'text/html;charset=UTF-8'} %title= 'Topics:' + controller.action_name = stylesheet_link_tag 'scaffold' %body %p{:style => 'color: green'}= flash[:notice] = yield
app/views/topics/index.html.haml
%h1 Listing topics %table %tr %th Title - @topics.each do |topic| %tr %td= h topic.title %td= link_to 'Show', topic %td= link_to 'Edit', edit_topic_path(topic) %td= link_to 'Destroy', topic, :confirm => 'Are you sure?', :method => :delete %br = link_to 'New topic', new_topic_path
app/views/topics/new.html.haml
%h1 New topic - form_for @topic do |f| = f.error_messages %p = f.label :title %br = f.text_field :title %p= f.submit 'Create' = link_to 'Back', topics_path
app/views/topics/show.html.haml
%p %b Title: = h @topic.title = link_to 'Edit', edit_topic_path(@topic) | = link_to 'Back', topics_path
app/views/topics/edit.html.haml
%h1 Editing topic - form_for @topic do |f| = f.error_messages %p = f.label :title %br = f.text_field :title %p= f.submit 'Update' = link_to 'Show', @topic | = link_to 'Back', topics_path
だいたいこんな感じだろか?
個人的にはerbよりいっす!