Rails

Rails rendering partial or block with layout

Today I learned to render Rails partial or block with a layout. This helps reduce the duplication of code and break HTML in smaller components.

Read
Hotwire

Hotwire turbo_frame_tag doesn't work within table HTML tag

Stuck in an issue while trying turbo_frame_tag in tables to replace a row with newly added record. TIL turbo_frame_tag doesn't work within table HTML tag

Read
Stimulus

Stimulus Naming Conventions

Stimulus Rails naming conventions

Read
Rails

Rails Generator Handles Action Text Fields

Learn about running rails model and scaffold generator with Action Text rich text field attributes to configure the model and scaffold views with appropriate Action Text settings.

Read
Rails

Rails Generator Handles Active Storage Attachment Fields

Learn about running rails model and scaffold generator with Active Storage attachment and attachments field attributes to configure the model and scaffold views with appropriate active storage settings.

Read