Module: ActionView::Layouts
- Defined in:
- lib/spree_multi_domain.rb
Instance Method Summary collapse
Instance Method Details
#find_layout_with_multi_store(layout) ⇒ Object
99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/spree_multi_domain.rb', line 99 def find_layout_with_multi_store(layout) store_layout = layout if respond_to?(:current_store) && current_store && !controller.is_a?(Admin::BaseController) store_layout = layout.gsub("layouts/", "layouts/#{current_store.code}/") end begin find_layout_without_multi_store(store_layout) rescue ::ActionView::MissingTemplate find_layout_without_multi_store(layout) end end |