Class: CamaleonCms::Admin::InstallersController
- Inherits:
-
CamaleonController
- Object
- CamaleonController
- CamaleonCms::Admin::InstallersController
- Defined in:
- app/controllers/camaleon_cms/admin/installers_controller.rb
Overview
Camaleon CMS is a content management system
Copyright (C) 2015 by Owen Peredo Diaz
Email: [email protected]
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License (GPLv3) for more details.
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
16 17 18 19 20 |
# File 'app/controllers/camaleon_cms/admin/installers_controller.rb', line 16 def index @site ||= CamaleonCms::Site.new @site.slug = request.original_url.to_s.parse_domain render "form" end |
#installer_verification ⇒ Object
37 38 39 |
# File 'app/controllers/camaleon_cms/admin/installers_controller.rb', line 37 def installer_verification redirect_to cama_root_url unless CamaleonCms::Site.count == 0 end |
#save ⇒ Object
22 23 24 25 26 27 28 29 30 31 |
# File 'app/controllers/camaleon_cms/admin/installers_controller.rb', line 22 def save @site = CamaleonCms::Site.new(params[:site].permit(:slug, :name )).decorate if @site.save site_after_install(@site, params[:theme]) flash[:notice] = t('camaleon_cms.admin.sites.message.created') redirect_to action: :welcome else index end end |
#welcome ⇒ Object
33 34 35 |
# File 'app/controllers/camaleon_cms/admin/installers_controller.rb', line 33 def welcome end |