I have a controller using caches_action
controllers/bar_controller.rb:
caches_action :bar, :layout => false
and in the view of this action, I'ill setting html title in layout.
views/foo/bar.html.erb:
<%= content_for :mytitle do "testing" end %>
this is my layout file:
views/layouts/application.html.erb:
<title><%= yield :mytitle %></title>
However, this only work in development. In production, it does not work. Any idea is appreciated. thanks.
similar question: Is there a workaround for ignored content_for blocks with caches_action and :layout => false?