suggested changes that includes:
moving actions for custom domain in its own controller use separate service class for custom domains updated help text for custom domains increased test coverage for custom domains
This commit is contained in:
parent
d2b5ec1770
commit
bc17f210a6
14 changed files with 208 additions and 73 deletions
|
|
@ -4,23 +4,6 @@ module Admin
|
|||
load_resource :program, through: :conference, singleton: true, except: :index
|
||||
load_resource :user, only: [:remove_user]
|
||||
|
||||
def custom_domain
|
||||
redirect_to attach_custom_domain_admin_conference_path(@conference.short_title) unless @conference.custom_domain.present?
|
||||
end
|
||||
|
||||
def attach_custom_domain; end
|
||||
|
||||
def update_domain
|
||||
@conference.assign_attributes(conference_params)
|
||||
if @conference.save
|
||||
redirect_to custom_domain_admin_conference_path(id: @conference.short_title),
|
||||
notice: 'Added new domain name to conference. This does not mean that the new domain should work. Please make sure you follow step 2 to point your domain to this hosted version'
|
||||
else
|
||||
redirect_to custom_domain_admin_conference_path(id: @conference.short_title),
|
||||
notice: 'Failed to add the new domain as custom domain to the conference'
|
||||
end
|
||||
end
|
||||
|
||||
def index
|
||||
# Redirect to new form if there is no conference
|
||||
if Conference.count == 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue