How can I create a language toggle with the Mobility gem? Coming from Globalize I was using:
<% if I18n.locale == I18n.default_locale %>
<% Globalize.with_locale(:fr) do %>
<%= link_to "Français", url_for(slug: @page.slug, locale: 'fr') %>
<% end %>
<% else %>
<% Globalize.with_locale('en-ca') do %>
<%= link_to "English", url_for(slug: @page.slug, locale: 'en-ca') %>
<% end %>
<% end %>
But this isn't working with Mobility.
Figured it out, for anyone else that has the same issue:
Answer was found here: https://github.com/norman/friendly_id-globalize/issues/7