Permalink
Browse files

Add some generic haml snippets

  • Loading branch information...
1 parent 04bbc04 commit 3931c5373043fdfc27472dc2e26d9e8597151fbe @graudeejs committed Jul 21, 2012
Showing with 37 additions and 0 deletions.
  1. +37 −0 snippets/haml/rails.snippets
@@ -28,4 +28,41 @@ snippet html
$('#${2:page_body}').html('#{escape_javascript(render :partial => '${1:new}', :layout => false)}');
endsnippet
+
+
+snippet .textfield
+.field
+ = f.label :$1
+ %br
+ = f.textfield :${1:field_for}
+
+$0
+endsnippet
+
+
+
+snippet .textarea
+.field
+ = f.label :$1
+ %br
+ = f.text_area :${1:field_for}
+
+$0
+endsnippet
+
+
+snippet .checkbox
+.field
+ = f.check_box :${1:field_for}
+ = f.label :$1
+
+$0
+endsnippet
+
+
+
+
+
+
+
# vim: set ts=2 sw=2 expandtab:

0 comments on commit 3931c53

Please sign in to comment.