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