Skip to content

Commit

Permalink
HTML2HAML : comments, tags.
Browse files Browse the repository at this point in the history
  • Loading branch information
yannr77 committed Jan 30, 2012
1 parent 60fcef1 commit 63b01ea
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 42 deletions.
17 changes: 0 additions & 17 deletions app/views/comments/_comment.html.erb

This file was deleted.

11 changes: 11 additions & 0 deletions app/views/comments/_comment.html.haml
@@ -0,0 +1,11 @@
%p
%b Name:
= comment.commenter
%p
%b Content:
= comment.body
%p
- if can? :destroy, @post
= link_to 'Destroy Comment', [comment.post, comment], |
:confirm => 'Are you sure?', |
:method => :delete |
13 changes: 0 additions & 13 deletions app/views/comments/_form.html.erb

This file was deleted.

11 changes: 11 additions & 0 deletions app/views/comments/_form.html.haml
@@ -0,0 +1,11 @@
= form_for([@post, @post.comments.build]) do |f|
.field
= f.label :name
%br
= f.text_field :commenter
.field
= f.label :content
%br
= f.text_area :body
.actions
= f.submit
12 changes: 0 additions & 12 deletions app/views/tags/_form.html.erb

This file was deleted.

8 changes: 8 additions & 0 deletions app/views/tags/_form.html.haml
@@ -0,0 +1,8 @@
= form.fields_for :tags do |tag_form|
.field
= tag_form.label :name, 'Tag:'
= tag_form.text_field :name
- unless tag_form.object.nil? || tag_form.object.new_record?
.field
= tag_form.label :_destroy, 'Remove:'
= tag_form.check_box :_destroy

0 comments on commit 63b01ea

Please sign in to comment.