I've been chatting a bit with Yehuda about his recent post on
automatic flushing (http://yehudakatz.com/2010/09/07/automatic-
flushing-the-rails-3-1-plan/), and I wanted people's ideas about how
the API should work and what the new API should be called. I'm gonna
write some tests/code/docs and send it to Yehuda (or any other
committer who cares to look it over). There's a good chance that what
I write won't be useable, but hopefully it'll at least be
Anyway, I kinda like "provide", but I like "final_content_for"
better. Mostly, I feel like the call to this method should *finalize*
the content for that key, meaning you could do something like this:
content_for :foo, "bar"
final_content_for :foo, "baz"
Then if you called "content_for :foo" or "final_content_for :foo"
again, Rails would raise an exception. Calling "yield :foo" would
Otherwise, content_for and provide (or whatever it ends up being
called) could be kept entirely separate, though I feel that could be
somewhat confusing for people, but maybe I'm wrong (?).
What are people's thoughts re: name and re: behavior wrt content_for
and the new, automatic-flushing api?
PS: The main reason I want to get this nailed down is so I can work on
this content_for/action caching patch I submitted awhile back.