Class: RubyCms::Admin::AdminPage::AdminTableContent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/ruby_cms/admin/admin_page/admin_table_content.rb

Overview

Optional wrapper for pages that want a consistent Turbo Frame target for table/content updates (pagination, filters, search, etc).

Default ID matches RubyCMS convention: “admin_table_content”.

Instance Method Summary collapse

Methods inherited from BaseComponent

#build_classes, #conditional_attributes, #controller, #form_authenticity_token, #helpers, #merge_data_attributes, #token_from_controller, #token_from_controller?, #token_from_helpers?

Constructor Details

#initialize(id: "admin_table_content", **attrs) ⇒ AdminTableContent

Returns a new instance of AdminTableContent.



11
12
13
14
15
# File 'app/components/ruby_cms/admin/admin_page/admin_table_content.rb', line 11

def initialize(id: "admin_table_content", **attrs)
  super()
  @id = id
  @attrs = attrs
end

Instance Method Details

#view_templateObject



17
18
19
# File 'app/components/ruby_cms/admin/admin_page/admin_table_content.rb', line 17

def view_template(&)
  turbo_frame_tag(@id, **default_attrs.merge(@attrs), &)
end