Skip to content

Commit

Permalink
Change for rails3 rc
Browse files Browse the repository at this point in the history
  • Loading branch information
fwalch committed Aug 6, 2010
1 parent a19f9a8 commit 1e4b79d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/i18n_routing_rails3.rb
Expand Up @@ -146,7 +146,7 @@ def define_url_helper(route, name, kind, options)
def localized(locales = I18n.available_locales, opts = {})
# Add if not added Rails.root/config/locales/*.yml in the I18n.load_path
if !@i18n_routing_path_set and defined?(Rails) and Rails.respond_to?(:root) and Rails.root
I18n.load_path = (I18n.load_path << Dir[Rails.root.join('config', 'locales', '*.yml').to_s]).uniq
I18n.load_path = (I18n.load_path << Dir[Rails.root.join('config', 'locales', '*.yml')]).flatten.uniq
@i18n_routing_path_set = true
end

Expand Down Expand Up @@ -373,4 +373,4 @@ def generate_with_i18n_routing(method, params = {}, recall = {}, options = {})
end

ActionDispatch::Routing::Mapper.send :include, I18nRouting::Mapper
Rack::Mount::Route.send :include, I18nRouting::RackMountRoute
Rack::Mount::Route.send :include, I18nRouting::RackMountRoute

0 comments on commit 1e4b79d

Please sign in to comment.