Sha256: b8cc6f102075cce5e54397b209b6044b63aecebfa2855f1c9677b0c2a11f5314

Contents?: true

Size: 692 Bytes

Versions: 43

Compression:

Stored size: 692 Bytes

Contents

# frozen_string_literal: true

module Alchemy
  module Admin
    class SitesController < ResourcesController
      def create
        @site = Alchemy::Site.new(resource_params)
        if @site.save
          flash[:notice] = Alchemy.t("Please create a default language for this site.")
          do_redirect_to alchemy.admin_languages_path(site_id: @site)
        else
          render :new
        end
      end

      def destroy
        if @site.destroy
          flash[:notice] = Alchemy.t("Site successfully removed")
        else
          flash[:warning] = @site.errors.full_messages.to_sentence
        end
        do_redirect_to alchemy.admin_sites_path
      end
    end
  end
end

Version data entries

43 entries across 43 versions & 1 rubygems

Version Path
alchemy_cms-7.3.5 app/controllers/alchemy/admin/sites_controller.rb
alchemy_cms-7.2.8 app/controllers/alchemy/admin/sites_controller.rb
alchemy_cms-7.1.13 app/controllers/alchemy/admin/sites_controller.rb
alchemy_cms-7.0.16 app/controllers/alchemy/admin/sites_controller.rb
alchemy_cms-7.3.4 app/controllers/alchemy/admin/sites_controller.rb
alchemy_cms-7.3.3 app/controllers/alchemy/admin/sites_controller.rb
alchemy_cms-7.3.2 app/controllers/alchemy/admin/sites_controller.rb
alchemy_cms-7.2.7 app/controllers/alchemy/admin/sites_controller.rb
alchemy_cms-7.3.1 app/controllers/alchemy/admin/sites_controller.rb
alchemy_cms-7.3.0 app/controllers/alchemy/admin/sites_controller.rb
alchemy_cms-7.2.6 app/controllers/alchemy/admin/sites_controller.rb
alchemy_cms-7.2.5 app/controllers/alchemy/admin/sites_controller.rb
alchemy_cms-7.1.12 app/controllers/alchemy/admin/sites_controller.rb
alchemy_cms-7.0.15 app/controllers/alchemy/admin/sites_controller.rb
alchemy_cms-7.2.4 app/controllers/alchemy/admin/sites_controller.rb
alchemy_cms-7.1.11 app/controllers/alchemy/admin/sites_controller.rb
alchemy_cms-7.2.3 app/controllers/alchemy/admin/sites_controller.rb
alchemy_cms-7.1.10 app/controllers/alchemy/admin/sites_controller.rb
alchemy_cms-7.2.2 app/controllers/alchemy/admin/sites_controller.rb
alchemy_cms-7.1.9 app/controllers/alchemy/admin/sites_controller.rb