Hello,
I have a problem or don''t have :)
Please check following if i did right:
I have a web pages, that includes partials. Also i used Globalize plugin
for translating web-pages. I get a problem with caching partials when
used next code:
<% cache "header" do %>
<%= render :partial => ''/header'' %>
<% end %>
But after this header cached with one language,and changing language no
make changing header.
So i try this code(method get_cuurent_lang returns string with current
lang or default):
<% cache "header-#{get_current_lang}" do %>
<%= render :partial => ''/header'' %>
<% end %>
And i got header-us-US, header-ru-RU cached pages.
Thanks
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---