Merge branch 'master' into feature/donations_btcpay
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
class Admin::Settings::RegistrationsController < Admin::SettingsController
|
||||
def index
|
||||
def show
|
||||
end
|
||||
|
||||
def create
|
||||
def update
|
||||
update_settings
|
||||
|
||||
redirect_to admin_settings_registrations_path, flash: {
|
||||
|
||||
@@ -1,19 +1,32 @@
|
||||
class Admin::Settings::ServicesController < Admin::SettingsController
|
||||
def index
|
||||
@service = params[:s]
|
||||
before_action :set_service, only: [:show, :update]
|
||||
|
||||
if @service.blank?
|
||||
redirect_to admin_settings_services_path(params: { s: "btcpay" })
|
||||
end
|
||||
def index
|
||||
redirect_to admin_settings_service_path("btcpay")
|
||||
end
|
||||
|
||||
def create
|
||||
service = params.require(:service)
|
||||
def show
|
||||
end
|
||||
|
||||
def update
|
||||
update_settings
|
||||
|
||||
redirect_to admin_settings_services_path(params: { s: service }), flash: {
|
||||
redirect_to admin_settings_service_path(@service), flash: {
|
||||
success: "Settings saved"
|
||||
}
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_subsection
|
||||
@subsection = "services"
|
||||
end
|
||||
|
||||
def set_service
|
||||
@service = params[:service]
|
||||
|
||||
if @service.blank?
|
||||
redirect_to admin_settings_services_path and return
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -20,7 +20,7 @@ class Admin::SettingsController < Admin::BaseController
|
||||
end
|
||||
|
||||
if @errors.any?
|
||||
render :index and return
|
||||
render :show and return
|
||||
end
|
||||
|
||||
changed_keys.each do |key|
|
||||
|
||||
Reference in New Issue
Block a user