Sha256: c8d5f5b04152cd16c9294a2f7b8d2656d68359f9740a58683b8f4860421603bb

Contents?: true

Size: 443 Bytes

Versions: 5

Compression:

Stored size: 443 Bytes

Contents

ActionController::Base.class_eval do

  private

  def set_template_path
    if request.respond_to?(:site) && request.site
      # We are in site namespace
      unless request.site.default_template.blank?
        prefix = SiteFramework::Engine.view_path_prefix
        prepend_view_path "#{prefix}/#{request.site.default_template}"
      end
    end
  end

end


ActionController::Base.instance_eval do
  before_action :set_template_path
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
site_framework-4.3.3 lib/site_framework/action_controller/base.rb
site_framework-4.3.2 lib/site_framework/action_controller/base.rb
site_framework-4.3.1 lib/site_framework/action_controller/base.rb
site_framework-4.3.0 lib/site_framework/action_controller/base.rb
site_framework-4.2.0 lib/site_framework/action_controller/base.rb