Skip to content

Conversation

@skryukov
Copy link
Collaborator

No description provided.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 19, 2025

Deploying inertia-rails with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3318748
Status: ✅  Deploy successful!
Preview URL: https://46c5f1cd.inertia-rails.pages.dev
Branch Preview URL: https://flash-props.inertia-rails.pages.dev

View logs

@skryukov skryukov changed the title Add InertiaRails.flash props Add flash data Dec 19, 2025
@skryukov skryukov force-pushed the flash-props branch 2 times, most recently from 2283f20 to e11e697 Compare December 19, 2025 08:31
@skryukov skryukov requested a review from Copilot December 19, 2025 08:42
@skryukov skryukov marked this pull request as ready for review December 19, 2025 08:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds flash data functionality to InertiaRails, enabling one-time notifications that don't persist in browser history. Flash data is ideal for success messages, toast notifications, or other temporary values that should only appear once and not when users navigate through browser history.

Key changes:

  • Introduces inertia_flash controller method for setting flash data via hash assignment syntax
  • Adds support for passing flash data via redirect_to url, inertia: { flash: {...} }
  • Flash data appears at page level (not in props) and is automatically cleared after rendering

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
spec/inertia/flash_sharing_spec.rb Comprehensive test coverage for flash data including redirects, accumulation across multiple redirects, stale version handling, and partial updates
spec/dummy/config/routes.rb Adds test routes for flash data controller actions
spec/dummy/app/controllers/inertia_test_controller.rb Implements test controller actions demonstrating both flash data syntaxes and edge cases
lib/inertia_rails/renderer.rb Retrieves flash data from controller and adds it to page response at root level
lib/inertia_rails/middleware.rb Updates session cleanup logic to include flash data deletion and improves comment clarity
lib/inertia_rails/controller.rb Adds inertia_flash method and capture_inertia_session_options logic to handle flash data with validation
docs/guide/shared-data.md Replaces old flash messages section with reference to new flash data documentation
docs/guide/flash-data.md Complete documentation for flash data feature with examples for all frameworks and TypeScript configuration
docs/guide/events.md Documents the new flash event for handling flash data centrally
docs/.vitepress/config.mts Adds flash data documentation to navigation menu

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@skryukov skryukov force-pushed the flash-props branch 2 times, most recently from 05f3596 to 029767b Compare December 19, 2025 19:36
@skryukov skryukov marked this pull request as draft December 20, 2025 06:42
@skryukov skryukov marked this pull request as ready for review December 22, 2025 13:35
@skryukov skryukov requested a review from Copilot December 22, 2025 13:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 43 out of 46 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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