module ContentForRails
Constants
- VERSION
Public Instance Methods
content_for(name, content)
click to toggle source
# File lib/content_for_rails.rb, line 10 def content_for(name, content) @_content_for ||= {} if @_content_for[name].respond_to?(:<<) @_content_for[name] << content else @_content_for[name] = content end end
content_for?(name)
click to toggle source
# File lib/content_for_rails.rb, line 19 def content_for?(name) @_content_for[name].present? end
view_context()
click to toggle source
Calls superclass method
# File lib/content_for_rails.rb, line 2 def view_context super.tap do |view| (@_content_for || {}).each do |name, content| view.content_for name, content end end end