inertia_share fails on second request
ledermann opened this issue · comments
Georg Ledermann commented
I'm playing around with inertia_rails
within a Rails 6 application like this:
class ApplicationController < ActionController::Base
inertia_share do
{
foo: 42
}
end
end
This works fine on the first request (props include foo:42
), but all subsequent requests fail (props not include foo:42
). When I modify my source file (application_controller.rb
) and change foo
to 43, it works on the following one request, but the next requests will fail again.
This can be reproduced with the test suite when you swap the order of the two context blocks in this file:
inertia-rails/spec/inertia/sharing_spec.rb
Lines 4 to 18 in a27564b
Seems to be caused by #13.