Module: Spree::ThemeConcern
- Extended by:
- ActiveSupport::Concern
- Included in:
- StoreController
- Defined in:
- app/controllers/concerns/spree/theme_concern.rb
Instance Method Summary collapse
Instance Method Details
#default_url_options ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'app/controllers/concerns/spree/theme_concern.rb', line 12 def if current_theme.present? && current_theme_preview.present? super.merge!(theme_id: current_theme.id, theme_preview_id: current_theme_preview.id) elsif params[:theme_id].present? && params[:theme_preview_id].blank? super.merge!(theme_id: params[:theme_id]) else super end end |
#set_theme_view_paths ⇒ Object
22 23 24 25 26 27 |
# File 'app/controllers/concerns/spree/theme_concern.rb', line 22 def set_theme_view_paths # add default Spree theme prepend_view_path [Spree::Storefront::Engine.root, 'app/views/themes/default'].join('/') # add current theme prepend_view_path "app/views/themes/#{current_theme.class.name.demodulize.underscore}" end |