Revision: 3257
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at June 27, 2007 19:17 by imakethings
Initial Code
def content_tag(name, *options, &proc)
content = options.shift unless options.first.is_a?(Hash)
content ||= nil
options = options.shift
if block_given?
concat("<#{name}#{tag_options(options.stringify_keys) if options}>", proc.binding)
yield(content)
concat("</#{name}>", proc.binding)
elsif content.nil?
"<#{name}#{tag_options(options.stringify_keys) if options} />"
else
super(name, content, options)
end
end
Initial URL
Initial Description
Initial Title
content_tag (modified): Part 1 (app helper)
Initial Tags
rails
Initial Language
Ruby