Skip to content

Update holiday menu and admin workflows for Rails 6.1 upgrade#302

Open
kylefritz wants to merge 11 commits intoholiday_menus2from
codex/motzi-rails-upgrade
Open

Update holiday menu and admin workflows for Rails 6.1 upgrade#302
kylefritz wants to merge 11 commits intoholiday_menus2from
codex/motzi-rails-upgrade

Conversation

@kylefritz
Copy link
Owner

Summary

  • refresh menu-related JavaScript, styles, and API types to keep the holiday ordering flow working
  • adjust admin controllers, views, and SQL queries for the new menu type and UI refinements
  • apply schema/migration updates plus supporting docs and fixtures for the Rails 6.1 upgrade

Testing

  • Not run (not requested)

@kylefritz kylefritz changed the base branch from master to holiday_menus2 February 27, 2026 20:01
@chatgpt-codex-connector
Copy link

💡 Codex Review

@holiday_menu = Menu.current_holiday

P1 Badge Exclude holiday payload from explicit menu previews

When menu_id is provided (for /menus/:id.json), this still injects @holiday_menu = Menu.current_holiday, so requesting the current holiday menu returns the same menu in both menu and holidayMenu. The new React branch in App.tsx then renders tabs and routes the first tab through the regular-order submit path (no menu_id), which can create/update orders on the regular menu with holiday items/pickup days. Restrict holiday payload to the main current-menu response or suppress it when @menu already is the holiday menu.


motzi/app/admin/menus.rb

Lines 133 to 134 in d7c3f1c

if menu.holiday?
em "Holiday menus don't send emails — announce in the regular weekly menu's subscriber note."

P1 Badge Enforce no-email holiday policy in backend action

This adds a UI-only message that holiday menus do not send emails, but there is still no server-side guard on the existing email_menu action, which continues to call publish_to_subscribers! and queue weekly emails for any menu. A direct POST to /admin/menus/:id/email_menu (stale form/bookmark/curl) can therefore send an unintended blast for holiday menus; the holiday restriction needs to be enforced in the action/model, not only hidden in the view.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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.

1 participant