All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- New (super awesome) landing page design (seriously, go look at the animated graphic) (@skryukov)
- Convert
_inertia_metato Hash in props for testing (@greendrop) - Make InertaRails.scroll props deferable (@skyrukov)
- Add
withAllErrorsas default (@skyrukov) - Improved testing with
evaluate_optional_props(@skyrukov) - Add Railsified Precognition support (@skyrukov)
- Add support for use_data_inertia_head_attribute configuration option (@greendrop)
- Fix for exception pages in Rails 8.2 (@feliperaul)
- Improved test helpers for both RSpec and Minitest (@skryukov)
- Add Calm Companies to Awesome page (@raulpopadineti)
- Clarify error bags in docs (@skryukov)
- A smattering of helpful docs updates (@skryukov)
- Fix vit binstub (@skryukov)
- Fix optional once props (@skryukov)
- Support for new Flash API in Inertia.js page object (@skryukov)
- Generator improvements (@skryukov)
- Fix debug exceptions patch for Rails 8.2 (@crobbo)
- Support for rendering initial page data in a script tag (@skryukov)
- Once props support (@skryukov)
- Fix file references in TypeScript templates (@bigmasonwang)
Lots of quality of life improvements!
- OG Pilot in Awesome page (@raulpopadineti)
- Expose InertiaRails version (@capripot)
- Svelte improvements to install generators (@alec-c4)
- Add start kits to docs (@skryukov)
- Fix types in React install templates (@skryukov)
- Update docs with new inertia branding (@skryukov)
- Add protocol diagram (@skryukov)
- Fix forceIndicesArrayFormatInFormData in install generator (@skryukov)
- Add Kickstart templates to awesome page (@alec-c4)
- Improve generators for TypeScript users (@Andy9822)
- Update example pages to mimic Rails styling and appear at root path by default (@capripot)
- Update error types in install templates (@skryukov)
- Update installers (@skryukov)
- Update scaffolds (@skryukov)
- Remove Svelte 4 option in installation generators (@skryukov)
- Fix scroll props and deferred props for shared data (@bknoles)
- Deprecate the probably-no-actually-used-anywhere public readers on InertiaRails::Renderer (@bknoles)
- Docs updates (@leenyburger, @skryukov, @bn-l)
- Reimplement devcontainers (@kieraneglin)
- Support for Inertia.js infinite scroll components (@skyrukov)
- New merge options (@skryukov)
- Fix Svelte generator (@skryukov)
- Docs updates for SSR and 2.1.2 (@skryukov)
- Devcontainers for local dev (@kieraneglin)
- Add configurable prop transformation (@kieraneglin)
- Gradual deprecation of null errors because Inertis.js expects an empty object (@skryukov)
- Allow the more helpful UnknownFormat exception to raise when a static intertia route is requested with a non-HTML format (@skryukov)
- llms.txt in docs (@brandonshar and @skryukov)
- Add support for deep merging merge props (@skryukov)
- Server managed meta tags (@bknoles and @skryukov)
- Docs updates
- Add
parent_controllerconfiguration option for static Inertia routes
- Docs updates
- Fix template detection for scaffolds using Tailwind 4 (#202)
- Improved inertia route helper (#201)
- RSpec tweaks
- Add inertia_rendering? helper method (#209)
- Add support for new client-side deep merging option (#213)
- Docs updates
- Fix for namespaced static routes (@skyrukov)
- Fix for detecting tailwindcss in templates (@skyrukov)
- Docs updates
- Configuration via ENV variables (#196, @skryukov)
- Routing improvements for the inertia routes helper (#195, @skryukov)
- When automatically determining the component path, the component name can now be omitted, instead of requiring
render inertia: true(#199, @skryukov)
- Install generator tweaks @skryukov
- Performance improvement for oj serialization users @alexspeller
- Doc updates @youyoumu
- Doc updates @pedroaugustoramalhoduarte
- Tailwind v4 support in install generators @arandilopez
- Various CI fixes @bknoles / @skryukov
Support for the v2.0 Inertia.js release! It's a minor bump because there are no breaking changes!
Kudos to @skryukov and @PedroAugustoRamalhoDuarte for driving the features in this release!
- InertiaRails.defer for deferred props
- History encryption
- InertiaRails.merge for merge props
- InertiaRails.optional props (replaces lazy props in v2.0, InertiaRails.lazy now has a deprecation warning)
- Add Algolia search for docs (#151, @skryukov)
- Add support for Always props (#152, @skryukov)
- Add support for :except in partial reloads (#152, @skryukov)
- CI fixes (#156, @bknoles)
- Support dot notation for :only partial reloads (#163, @bknoles)
- Avoid some monkey patching (#164, @adrianpacala)
- Upstream generators from inertia_rails-contrib (#158, @skryukov)
- Raise a deprecation warning instead of an exception if you pass a non-hashable to inertia errors (#168, @skryukov)
- Inertia Rails documentation (@skryukov)
- Add specs for config refactor (#139)
- New feature: if/unless/only/except options for inertia_share. Enables per-action sharing! (#137, @skryukov)
- Bugfix: for inertia errors when using message_pack to serialize cookies. (#143, @BenMorganMY)
- Test Rails 7.2 in CI/CD (#145, @skryukov)
- Bring redirect behavior in line with Rails 7.0 behavior (#146, @skryukov)
- Gemspec cleanup (#149, @skryukov)
- Refactor Inertia configuration into a controller class method. Thanks @ElMassimo!
- Documentation updates. Thanks @osbre and @austenmadden!
- Further fixes to the
Varyheader. Thanks @skryukov! - Add configuration option for the component path in the renderer.
- Refactor the internals of shared Inertia data to use controller instance variables instead of module level variables that run a higher risk of being leaked between requests. Big thanks to @ledermann for the initial work many years ago and to @PedroAugustoRamalhoDuarte for finishing it up!
- Change the Inertia response to set the
Varyheader toX-Inertiainstead ofAccept, Thanks @osbre! - Always set the
XSRF-TOKENin anafter_actionrequest instead of only on non-Inertia requests. This fixes a bug where logging out (and resetting the session) via Inertia would create a CSRF token mismatch on a subsequent Inertia request (until you manually hard refreshed the page). Thanks @jordanhiltunen!
- Reset Inertia shared data after each RSpec example where
inertia: trueis used. Thanks @coreyaus! - Update Github Actions workflows to use currently supported Ruby/Rails versions. Thanks @PedroAugustoRamalhoDuarte!
- Depend on railties instead of rails so that applications which only use pieces of Rails can avoid a full Rails installation. Thanks @BenMorganMY!
- Fix
have_exact_propsRSpec matcher in the situation where shared props are defined in a lambda that outputs a hash with symbolized keys
- Fix broken partial reloads caused by comparing a list of symbolized keys with string keys from HashWithIndifferentAccess
- CSRF protection works without additional configuration now.
- Optional deep merging of shared props.
- Document Inertia headers. @buhrmi
- Documentation typo fix. @lujanfernaud
- Changelog URI fix. @PedroAugustoRamalhoDuarte
- Allow rails layout to set inertia layout. Thanks @ElMassimo!
- Add the ability to set inertia props and components via rails conventions (see readme)
- Fix for a middleware issue where global state could be polluted if an exception occurs in a request. Thanks @ElMassimo!
- Fix an issue with Rails 7.0. Thanks @0xDing and @aviemet!
- Drop support for Rails 5.0 (and mentally, though not literally drop support for Rails < 6)
- Allow inertia to take over after initial pageload when using ssr. Thanks @99monkey!
- SSR!
- Fixed thread safety in the middleware. Thanks @caifara!
- Fixed the install generator.
installable?was always returning false, preventing it from actually running. - Added an install generator for Vue.
- Added install generator to quickly add Inertia to existing rails apps via
rails inertia_rails:install:react
- Improve method for detecting whether a user used the RSpec helpers without adding
inertia: trueto the spec - Emit a warning when expecting an Inertia response in RSpec and never reaching a
render inertia:call
- Define
redirect_toandredirect_backas public methods for compatibility with other code using them
- Added the same inertia awareness that redirect_to has to redirect_back
- Add
inertiaroute helper feature
- Fix the definition for InertiaRails::Lazy to avoid an uninitialized constant error when booting an application.
- Add support for "lazy" props while rendering. These are props that never compute on the initial page load. The only render during a partial update that calls for them explicitly.
- Built in error sharing across redirects! adding
{ inertia: { errors: 'errors go here' } }as an option inredirect_towill automatically feed anerrorsprop to whatever is rendered after the redirect. - Set content type to json for Inertia responses
- Return the original response status with Inertia responses
- Test against multiple Rails versions in Github Actions
- Add the
inertia_locationcontroller method that forces a full page refresh
- Fixed a bug involving threadsafe versions and layouts
- Fixed Ruby 2.7 deprecation warnings
- Added
inertia_partial?method - Fixed homepage in the gemspec
- Make the InertiaRails module data threadsafe
- Fix a typo in the README (inertia only has 1 t!)
- Added request.inertia? method
- Added patches to allow Rails errors to show properly in the inertia modal
- Fixed a middleware issue caused by a breaking change in Rack v2.1.*
- Change page url to use path instead of url
- Moved Inertia Share logic to a before_action to ensure it runs on every request
- Added rspec helpers
- Make sure that
inertia_shareproperties are reset before each request
- Switches mattr_accessor defaults to block syntax to allow pre Rails 5.2 compatibility
- Allow
Intertia.sharewithin a controller to access controller methods
- Initial release