Skip to content

Commit

Permalink
resolve the bug with the link to translations
Browse files Browse the repository at this point in the history
  • Loading branch information
GCorbel committed Apr 16, 2013
1 parent 69a39e9 commit e7d1e72
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/helpers/application_helper.rb
Expand Up @@ -34,7 +34,8 @@ def markdown(code)

def link_to_locales
text = I18n.locale == :en ? "Version Française" : "English Version"
locale = I18n.locale == :en ? :fr : :en
link_to raw("<i class='icon-flag'></i> #{text}"), minimalist.root_path(locale: locale)
locale = I18n.locale == :en ? 'fr' : 'en'
path = url_for(controller: 'pages', action: 'show', locale: locale)
link_to raw("<i class='icon-flag'></i> #{text}"), path
end
end

0 comments on commit e7d1e72

Please sign in to comment.