Skip to content

Commit

Permalink
Correcao para funcionar o I18n no Passenger
Browse files Browse the repository at this point in the history
  • Loading branch information
Joao Paulo Barros committed Aug 21, 2009
1 parent 9983439 commit 8404d5c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion app/controllers/application_controller.rb
Expand Up @@ -4,7 +4,7 @@ class ApplicationController < ActionController::Base
filter_parameter_logging "password"


before_filter :allow_to, :check_user, :set_profile, :login_from_cookie, :login_required, :check_permissions, :pagination_defaults
before_filter :set_locale, :allow_to, :check_user, :set_profile, :login_from_cookie, :login_required, :check_permissions, :pagination_defaults
after_filter :store_location
layout 'application'

Expand All @@ -28,6 +28,10 @@ def set_profile
@p.update_attribute :last_activity_at, Time.now if @p
end

def set_locale
I18n.locale = "pt-BR"
end




Expand Down
2 changes: 1 addition & 1 deletion config/environment.rb
Expand Up @@ -37,7 +37,7 @@
config.gem 'RedCloth', :lib => 'redcloth'
end

I18n.default_locale = "pt-BR" if RAILS_ENV != 'test'
#I18n.default_locale = "pt-BR" if RAILS_ENV != 'test'

Less::JsRoutes.generate!

0 comments on commit 8404d5c

Please sign in to comment.