Sha256: b0ed15e053f59cd49da38f39c35c77d9972985353a977f8c8fca2f2d7c3912b9
Contents?: true
Size: 465 Bytes
Versions: 12
Compression:
Stored size: 465 Bytes
Contents
module CamaleonCms module Apps class ThemesAdminController < CamaleonCms::AdminController 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}", "#{theme_name}/views")) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems