Class: Records::Utilities

Inherits:
Components::Base
  • Object
show all
Defined in:
app/components/databasium/records/utilities.rb

Instance Method Summary collapse

Constructor Details

#initialize(model:, columns_names_types:) ⇒ Utilities

Returns a new instance of Utilities.



4
5
6
7
# File 'app/components/databasium/records/utilities.rb', line 4

def initialize(model:, columns_names_types:)
  @model = model
  @columns_names_types = columns_names_types
end

Instance Method Details

#view_templateObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'app/components/databasium/records/utilities.rb', line 9

def view_template
  div(id: "records_utilities") do
    render Components::Databasium::Records::Filter.new(
             model: @model,
             turbo_frame: "records",
             columns_names_types: @columns_names_types,
             hidden: true
           )
    render Components::Databasium::Forms::Model.new(
             columns_names_types: @columns_names_types,
             model: @model
           )
  end
end