Skip to content

Instantly share code, notes, and snippets.

@brentsowers1
Created March 6, 2014 03:00
Show Gist options
  • Save brentsowers1/9381417 to your computer and use it in GitHub Desktop.
Save brentsowers1/9381417 to your computer and use it in GitHub Desktop.
application_helper
module ApplicationHelper
def inner_helper
str = content_tag(:p, "inside p content tag")
str << "a space should be between the following words: hello"
str << "&nbsp;"
str << "world"
str << "more <span style=\"font-weight:bold;\">dirty HTML</span>"
str << content_tag(:div, "inside div content tag")
end
def outer_helper
str = "<div>about to call inner_helper method</div>"
str << inner_helper
str << "<p>outside of inner_helper method in p tag</p>"
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment