mirror of
https://github.com/internetee/registry.git
synced 2025-07-05 02:33:35 +02:00
User interface for the registry along with basic settings
This commit is contained in:
parent
d5d1d0040b
commit
ceb688902f
26 changed files with 278 additions and 32 deletions
26
app/controllers/setting_groups_controller.rb
Normal file
26
app/controllers/setting_groups_controller.rb
Normal file
|
@ -0,0 +1,26 @@
|
|||
class SettingGroupsController < ApplicationController
|
||||
before_action :set_setting_group, only: [:show, :update]
|
||||
|
||||
def index
|
||||
@setting_groups = SettingGroup.all
|
||||
end
|
||||
|
||||
def show; end
|
||||
|
||||
def update
|
||||
if @setting_group.update(setting_group_params)
|
||||
redirect_to @setting_group
|
||||
else
|
||||
render 'show'
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
def set_setting_group
|
||||
@setting_group = SettingGroup.find(params[:id])
|
||||
end
|
||||
|
||||
def setting_group_params
|
||||
params.require(:setting_group).permit(settings_attributes: [ :value, :id ])
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue