Skip to content

Commit

Permalink
Change data attribute to match Turbolinks 5 syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
veger authored and parndt committed Nov 24, 2016
1 parent 4ebad7b commit 7f871c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions core/app/helpers/refinery/site_bar_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ module SiteBarHelper
def site_bar_switch_link
link_to_if(admin?, t('.switch_to_your_website', site_bar_translate_locale_args),
refinery.root_path(site_bar_translate_locale_args),
'data-no-turbolink' => true) do
'data-turbolinks' => false) do
link_to t('.switch_to_your_website_editor', site_bar_translate_locale_args),
Refinery::Core.backend_path, 'data-no-turbolink' => true
Refinery::Core.backend_path, 'data-turbolinks' => false
end
end

Expand All @@ -16,7 +16,7 @@ def site_bar_edit_link
link_to t('refinery.admin.pages.edit', site_bar_translate_locale_args),
refinery.admin_edit_page_path(@page.nested_url,
:switch_locale => (@page.translations.first.locale unless @page.translated_to_default_locale?)),
'data-no-turbolink' => true
'data-turbolinks' => false
end

def site_bar_translate_locale_args
Expand Down
4 changes: 2 additions & 2 deletions images/test.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<div id='site_bar_content' class='clearfix'>

<div id='editor_switch'>
<a data-no-turbolink="true" href="/">Switch to your website</a>
<a data-turbolinks="false" href="/">Switch to your website</a>
</div>

<a id="site_bar_refinery_cms_logo" target="_blank" href="http://refinerycms.com"> <span>Refinery CMS™</span> </a>
Expand Down Expand Up @@ -123,4 +123,4 @@ <h3>March 04, 2015</h3>
</div>
</div>
</body>
</html>
</html>

0 comments on commit 7f871c8

Please sign in to comment.