Class: Oversee::Resources::FieldsController

Inherits:
Oversee::ResourcesController
  • Object
show all
Defined in:
app/controllers/oversee/resources/fields_controller.rb

Instance Method Summary collapse

Instance Method Details

#inputObject

Renders the input field for a resource



9
10
11
12
13
14
15
16
17
18
# File 'app/controllers/oversee/resources/fields_controller.rb', line 9

def input
  component_dom_id = dom_id(@resource, key)
  component = Oversee::Field::Set.new(resource: @resource, datatype:, key:, value:, state: :input)

  respond_to do |format|
    format.turbo_stream do
      render turbo_stream: turbo_stream.replace(component_dom_id, component)
    end
  end
end

#showObject

Renders the display field for a resource



5
6
# File 'app/controllers/oversee/resources/fields_controller.rb', line 5

def show
end