Set page title from @page_title instance variable#25
Draft
raghubetina wants to merge 5 commits into
Draft
Conversation
Configure Puma to run in single mode by default to save memory. Set MALLOC_ARENA_MAX to 2 to reduce fragmentation. Enable Solid Queue in Puma to avoid extra worker processes.
Includes recommendations from perf_4.md and previous analyses: - Consolidate DB production pools (perf_2.md, perf_4.md) - Force Puma single mode via WEB_CONCURRENCY=1 (perf_1.md, perf_4.md) - Enable Solid Queue in Puma for durable jobs (perf_1.md, perf_4.md) - Tune MALLOC_ARENA_MAX=2 (perf_1.md, perf_4.md) - Move dev/test gems out of default group (perf_3.md) - Robust ENV handling in Puma and boot scripts
Switch the layout <title> to read from an @page_title instance variable, falling back to "Default title" when a controller action does not assign one. Controllers can set @page_title directly, which is simpler than threading the value through content_for/yield from each view.
Contributor
Author
|
A note: Rodauth defaults to setting page titles in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Change the application layout
<title>to read from an@page_titleinstance variable:Previously it used
content_for(:title) || "Rails 8 Template".Why
Controllers can assign
@page_titledirectly in an action, which is simpler than threading the value throughcontent_for/yieldfrom each view. The fallback"Default title"is used for any action that does not set one.Notes for discussion
"Rails 8 Template"to"Default title". If we want to keep the existing branded fallback, we should swap that back in.content_forto an instance variable is a convention change worth a quick review before merging.