User interface for the registry along with basic settings

This commit is contained in:
Martin Lensment 2014-08-15 14:45:53 +03:00
parent d5d1d0040b
commit ceb688902f
26 changed files with 278 additions and 32 deletions

View 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