Skip to content

Commit

Permalink
observe_locale -> observe_locales
Browse files Browse the repository at this point in the history
  • Loading branch information
Luca Guidi committed Jul 17, 2008
1 parent 64f88a6 commit 22b495b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions README
Expand Up @@ -25,7 +25,7 @@ Check for news and tutorials at the {project home page}[http://www.lucaguidi.com
rake click:setup

3. Add to ApplicationController:
around_filter :observe_locale
around_filter :observe_locales

4. Edit config/click.yml

Expand Down Expand Up @@ -80,7 +80,7 @@ Check for news and tutorials at the {project home page}[http://www.lucaguidi.com
formatting: textile

8. Add to ApplicationController:
around_filter :observe_locale
around_filter :observe_locales

9. Personalize the access to the globalization features, overriding #globalize:
class ApplicationController < ActionController::Base
Expand Down
2 changes: 1 addition & 1 deletion lib/click_to_globalize.rb
Expand Up @@ -202,7 +202,7 @@ def globalize?
# It's used as around_filter method, to add a <tt>LocaleObserver</tt> while the
# request is processed.
# <tt>LocaleObserver</tt> catches all translations and pass them to the session.
def observe_locale
def observe_locales
return unless globalize?
locale_observer = LocaleObserver.new
Globalize::Locale.add_observer(locale_observer)
Expand Down
2 changes: 1 addition & 1 deletion tasks/click_to_globalize.rake
Expand Up @@ -91,7 +91,7 @@ namespace :click do
end

puts "\nClick to Globalize was correctly installed.\n" +
"\nAdd to ApplicationController\n\taround_filter :observe_locale\n" +
"\nAdd to ApplicationController\n\taround_filter :observe_locales\n" +
"\nRemember to edit config/click.yml to add your locales.\n\n"
end

Expand Down
2 changes: 1 addition & 1 deletion test/click_to_globalize_test.rb
Expand Up @@ -212,7 +212,7 @@ def test_controller_globalize
assert @controller.globalize?
end

def test_controller_observe_locale
def test_controller_observe_locales
get :index, params
assert_response :success

Expand Down

0 comments on commit 22b495b

Please sign in to comment.