public
Rubygem
Fork of nex3/haml
Description: HTML Abstraction Markup Language - A Markup Haiku
Homepage: http://haml.hamptoncatlin.com
Clone URL: git://github.com/chriseppstein/haml.git
Fixing the %div[nil] error.



git-svn-id: svn://hamptoncatlin.com/haml/trunk@126 
7063305b-7217-0410-af8c-cdc13e5119b9
hcatlin (author)
Mon Nov 06 08:45:07 -0800 2006
commit  1af3e45ccc958b41006659c2f7fcc4cc8c7cabf2
tree    6528ceb9dc34ec251e0ced8e191eb5350176e0b3
parent  3e1a13b6977195bbba9559d92c57cba7418f3dfe
...
136
137
138
 
139
140
141
...
136
137
138
139
140
141
142
0
@@ -136,6 +136,7 @@ module Haml
0
     # one to create an attributes hash.
0
     def parse_object_ref(ref)
0
       ref = ref[0]
0
+ return {} if ref.nil?
0
       class_name = ref.class.to_s.underscore
0
       {:id => "#{class_name}_#{ref.id}", :class => class_name}
0
     end
...
2
3
4
 
 
...
2
3
4
5
6
0
@@ -2,3 +2,5 @@
0
   %h1= @article.title
0
   %div= @article.body
0
 %div{:class => "article full"}[@article]= "boo"
0
+%span[@not_a_real_variable_and_will_be_nil]
0
+ Boo

Comments

    No one has commented yet.