lib/wcc/contentful/model/menu_button.rb in wcc-contentful-app-1.3.2 vs lib/wcc/contentful/model/menu_button.rb in wcc-contentful-app-1.4.0.rc1

- old
+ new

@@ -14,13 +14,13 @@ # Example usage: `<%= link_to button.title, button.href %>` def href return external_link if external_link url = (link&.try(:slug) || link&.try(:url)) - return url unless fragment.present? - url = URI(url || '') - url.fragment = fragment + + url.path = "/#{sys.locale}#{url.path}" if sys.locale != WCC::Contentful.configuration.default_locale + url.fragment = fragment if fragment.present? url.to_s end def fragment WCC::Contentful::App::SectionHelper.section_id(section_link) if section_link