Class: GacoCms::Admin::FieldGroupsManagerController
- Inherits:
-
BaseController
- Object
- GacoCms::AdminController
- BaseController
- GacoCms::Admin::FieldGroupsManagerController
- Defined in:
- app/controllers/gaco_cms/admin/field_groups_manager_controller.rb
Instance Method Summary collapse
Methods inherited from BaseController
Instance Method Details
#field_tpl ⇒ Object
21 22 23 24 |
# File 'app/controllers/gaco_cms/admin/field_groups_manager_controller.rb', line 21 def field_tpl field = Field.new(kind: params[:kind]) render partial: 'field', locals: { field: field, parent_name: params[:parent_name] } end |
#group_tpl ⇒ Object
15 16 17 18 |
# File 'app/controllers/gaco_cms/admin/field_groups_manager_controller.rb', line 15 def group_tpl @group = FieldGroup.new render partial: 'group', locals: { group: @group } end |
#index ⇒ Object
11 12 13 |
# File 'app/controllers/gaco_cms/admin/field_groups_manager_controller.rb', line 11 def index @groups = @record.field_groups end |
#update ⇒ Object
26 27 28 29 30 31 32 |
# File 'app/controllers/gaco_cms/admin/field_groups_manager_controller.rb', line 26 def update if @record.update(groups_params) render inline: '' else render inline: @record.errors..join(', ') end end |