TrestleAdmin / trestle

A modern, responsive admin framework for Ruby on Rails
https://trestle.io
GNU Lesser General Public License v3.0
1.97k stars 177 forks source link

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

Closed spohlenz closed 2 months ago

spohlenz commented 2 months ago

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 commented 2 months ago

Coverage Status

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