Skip to content

Remove block passing / layout support from 'trestle/flash/alert' partial#500

Merged
spohlenz merged 1 commit intomainfrom
remove-flash-partial-layout
Sep 23, 2024
Merged

Remove block passing / layout support from 'trestle/flash/alert' partial#500
spohlenz merged 1 commit intomainfrom
remove-flash-partial-layout

Conversation

@spohlenz
Copy link
Member

In Rails partials, block_given? always returns true, meaning the trestle/flash/alert partial previously always called yield, occasionally causing duplicated content.

This PR removes support for using this template as a partial layout. While this does remove some flexibility, it solves the above problem and makes the usage of the partial simpler, clearer and more consistent.

@coveralls
Copy link

Coverage Status

coverage: 91.475%. remained the same
when pulling 7146fc3 on remove-flash-partial-layout
into f4ecf9b on main.

@spohlenz spohlenz merged commit cd82a27 into main Sep 23, 2024
@spohlenz spohlenz deleted the remove-flash-partial-layout branch September 23, 2024 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants