Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

return nil on replace/append/prepend in case you accidentally do <%= …

…instead of <%
  • Loading branch information...
commit 23105728c394f08e61dbe910936431d1caf9f2c1 1 parent 65717bc
@justinfrench justinfrench authored
Showing with 3 additions and 0 deletions.
  1. +3 −0  app/helpers/nestive/layout_helper.rb
View
3  app/helpers/nestive/layout_helper.rb
@@ -146,6 +146,7 @@ def block(name, content=nil, &block)
def append(name, content=nil, &block)
content = capture(&block) if block_given?
add_instruction_to_area(name, :push, content)
+ nil
end
# Prepends content to an area previously declared or modified in parent layout(s). You can
@@ -167,6 +168,7 @@ def append(name, content=nil, &block)
def prepend(name, content=nil, &block)
content = capture(&block) if block_given?
add_instruction_to_area(name, :unshift, content)
+ nil
end
# Replaces the content of an area previously declared or modified in parent layout(s). You can
@@ -188,6 +190,7 @@ def prepend(name, content=nil, &block)
def replace(name, content=nil, &block)
content = capture(&block) if block_given?
add_instruction_to_area(name, :replace, [content])
+ nil
end
private
Please sign in to comment.
Something went wrong with that request. Please try again.