Sha256: 77d9ec230b48a88a757ff16f058fdf2dc9e7e5e9a9e20174e3ef884054a6d72e

Contents?: true

Size: 400 Bytes

Versions: 71

Compression:

Stored size: 400 Bytes

Contents

class CamaleonCms::Apps::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

Version data entries

71 entries across 71 versions & 2 rubygems

Version Path
camaleon_cms-2.4.0 app/controllers/camaleon_cms/apps/themes_admin_controller.rb
camaleon_cms-2.3.7.2 app/controllers/camaleon_cms/apps/themes_admin_controller.rb
camaleon_cms-2.3.7.1 app/controllers/camaleon_cms/apps/themes_admin_controller.rb
camaleon_cms-2.3.7 app/controllers/camaleon_cms/apps/themes_admin_controller.rb
camaleon_cms-2.3.6 app/controllers/camaleon_cms/apps/themes_admin_controller.rb
camaleon_cms-2.3.5 app/controllers/camaleon_cms/apps/themes_admin_controller.rb
camaleon_cms-2.3.4 app/controllers/camaleon_cms/apps/themes_admin_controller.rb
camaleon_cms-2.3.3 app/controllers/camaleon_cms/apps/themes_admin_controller.rb
camaleon_cms-2.3.2 app/controllers/camaleon_cms/apps/themes_admin_controller.rb
camaleon_cms-2.3.1 app/controllers/camaleon_cms/apps/themes_admin_controller.rb
camaleon_cms-2.3.0 app/controllers/camaleon_cms/apps/themes_admin_controller.rb