1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Check for nil in Rails 3.0

This commit is contained in:
Matt Wildig 2013-09-04 17:09:52 +01:00
parent 754ac46ec7
commit ccfcd6497f

View file

@ -53,7 +53,7 @@ module ActionView
end
# NonCattingString is present in Rails less than 3.1.0. When support
# for 3.0 is dropped, this can be removed.
return ActionView::NonConcattingString.new(str) if defined?(ActionView::NonConcattingString)
return ActionView::NonConcattingString.new(str) if str && defined?(ActionView::NonConcattingString)
return str
else
capture_without_haml(*args, &block)