- return unless @site.is_mirrored?

- object ||= nil

- en, cy = cms_mirror_options(object)
- if en && cy
  #site__mirrors{data: { 'dough-component' => 'URLToggler' }}
    .toolbar__item.pull-right
      %span.image-flag
    .toolbar__item.js-switch-mode-buttons-group.pull-right
      .toggle.toggle--on-dark
        =radio_button_tag('edit-mode', en.first, en.last == request.fullpath, class: 'toggle__control', data: { 'value' => en.last })
        =radio_button_tag('edit-mode', cy.first, cy.last == request.fullpath, class: 'toggle__control', data: { 'value' => cy.last })
        =label_tag('edit-mode_en', en.first, class: 'toggle__label-heading')
        %span.toggle__indicator
        =label_tag('edit-mode_cy', class: 'toggle__label-heading') do
          =cy.first
          %span.icon-warning.fa.fa-warning

- return unless @site.is_mirrored?

- en, cy = cms_mirror_options(local_assigns[:object])

- if en && cy
  #site__mirrors{data: { 'dough-component' => 'URLToggler' }}
    .toolbar__item.pull-right
      %span.image-flag
    .toolbar__item.js-switch-mode-buttons-group.pull-right
      .toggle.toggle--on-dark
        =radio_button_tag('edit-mode', en.first, en.last == request.fullpath, class: 'toggle__control', data: { 'value' => en.last })
        =radio_button_tag('edit-mode', cy.first, cy.last == request.fullpath, class: 'toggle__control', data: { 'value' => cy.last })
        =label_tag('edit-mode_en', en.first, class: 'toggle__label-heading')
        %span.toggle__indicator
        =label_tag('edit-mode_cy', class: 'toggle__label-heading') do
          =cy.first
          %span.icon-warning.fa.fa-warning

Remove object assigns. Using local_assigns instead
Remove object assigns. Using local_assigns instead
