Sha256: 4e3e60f4e03b5f42b99ef75242bfc20518b36d97c2c677928bfe6ff50443643a
Contents?: true
Size: 475 Bytes
Versions: 12
Compression:
Stored size: 475 Bytes
Contents
module CamaleonCms module Apps class ThemesFrontController < CamaleonCms::FrontendController before_action :init_theme private def init_theme theme_name = params[:controller].split('/')[1] @theme = current_theme return render_error(404) unless current_theme.slug == theme_name lookup_context.prefixes.prepend(params[:controller].sub("themes/#{theme_name}", "themes/#{theme_name}/views")) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems