Class: Migrations::File
- Inherits:
-
Components::Base
- Object
- Components::Base
- Migrations::File
- Includes:
- Phlex::Rails::Helpers::ButtonTo, Phlex::Rails::Helpers::ContentFor, Phlex::Rails::Helpers::LinkTo, Phlex::Rails::Helpers::TurboFrameTag
- Defined in:
- app/components/databasium/migrations/file.rb
Instance Method Summary collapse
-
#initialize(migration:, content:) ⇒ File
constructor
A new instance of File.
- #view_template ⇒ Object
Constructor Details
#initialize(migration:, content:) ⇒ File
Returns a new instance of File.
9 10 11 12 |
# File 'app/components/databasium/migrations/file.rb', line 9 def initialize(migration:, content:) @migration = migration @content = content end |
Instance Method Details
#view_template ⇒ Object
14 15 16 17 18 19 20 21 22 23 |
# File 'app/components/databasium/migrations/file.rb', line 14 def view_template turbo_frame_tag( "migration", class: "flex flex-col flex-1 p-4 w-full min-h-0 overflow-hidden" ) do h1(class: "text-2xl font-bold mb-2 text-ellipsis break-all") { @migration.name } render_content render_extra_info end end |