Navigation Menu

Skip to content

Commit

Permalink
Remove references to Thread[:globalize_locale].
Browse files Browse the repository at this point in the history
  • Loading branch information
phiggins committed Mar 24, 2012
1 parent 4db5777 commit 0574563
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Expand Up @@ -8,7 +8,7 @@
:include_object_name => true %>
<% if localized? %>
<%%= render "locale_picker",
:current_locale => Thread.current[:globalize_locale] if Refinery.i18n_enabled? %>
:current_locale => Globalize.locale if Refinery.i18n_enabled? %>
<% end %>
<% attributes.each_with_index do |attribute, index| %>
<% if attribute.field_type.to_s != 'text_area' -%>
Expand Down
2 changes: 1 addition & 1 deletion pages/app/controllers/refinery/admin/pages_controller.rb
Expand Up @@ -50,7 +50,7 @@ def globalize!
# end
else
# Always display the tree of pages from the default frontend locale.
Thread.current[:globalize_locale] = params[:switch_locale].try(:to_sym) || Refinery::I18n.default_frontend_locale
Globalize.locale = params[:switch_locale].try(:to_sym) || Refinery::I18n.default_frontend_locale
end
end

Expand Down
Expand Up @@ -8,7 +8,7 @@ def link_to
# Get the switch_local variable to determine the locale we're currently editing
# Set up Globalize with our current locale
if ::Refinery.i18n_enabled?
Thread.current[:globalize_locale] = params[:switch_locale] || Refinery::I18n.default_locale
Globalize.locale = params[:switch_locale] || Refinery::I18n.default_locale
end

@pages = ::Refinery::Page.roots.paginate(:page => params[:page], :per_page => ::Refinery::Page.per_page(true))
Expand Down

0 comments on commit 0574563

Please sign in to comment.