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.
- 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: true
to the spec - Emit a warning when expecting an Inertia response in RSpec and never reaching a
render inertia:
call
- Define
redirect_to
andredirect_back
as public methods for compatibility with other code using them
- Added the same inertia awareness that redirect_to has to redirect_back
- Add
inertia
route 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_to
will automatically feed anerrors
prop 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_location
controller 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_share
properties are reset before each request
- Switches mattr_accessor defaults to block syntax to allow pre Rails 5.2 compatibility
- Allow
Intertia.share
within a controller to access controller methods
- Initial release