This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer
| class ApplicationController < ActionController::Base | |
| ... | |
| # FORCE to implement content_for in controller | |
| def view_context | |
| super.tap do |view| | |
| (@_content_for || {}).each do |name,content| | |
| view.content_for name, content | |
| end | |
| end | |
| end |
This gist is part of a blog post. Check it out at:
http://jasonrudolph.com/blog/2011/08/09/programming-achievements-how-to-level-up-as-a-developer