inertia_rails 1.12.0 → 1.12.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 468c8c88d85da84a010be47c474e9d8d1ed4735d5d83cd8058038401e322334c
4
- data.tar.gz: ce4ccdf41063f88495e8829dbefc4eb92936850d9f4da8a4f51e907eff9f90f4
3
+ metadata.gz: 168a95bf6f07afa800c4886e447a035e765a5d7247b0ba2341c9c9b700a46ef9
4
+ data.tar.gz: ff006c26b44dff8e5f6f2d0e0477a2af6322958d1ea55dd65da7bb19e79be14a
5
5
  SHA512:
6
- metadata.gz: 6a097f6f871a2b7b294e5e497d051c8d677230f8a600e4a602a73b742e76bce34686b7b76d3287bb2d5af897a3254a6d368b03a672c0830779b7753f9284a0f0
7
- data.tar.gz: caa62abc7dab0b7abe669b3735a4381e7ee1af3b705983b386059c4a0938a9df6a26f274f85169dbdf55a76bb4a06383e6930e22464035ef29fb6492af36bd2d
6
+ metadata.gz: 9d1afe94e402b67a10836b1508b55c14c18891dc132dd4cc9d548d759f5097855e685e76c733709bafb0eb42a88142fae9f282074122f820d5b44e039b952d88
7
+ data.tar.gz: 9c98cb05d7b30919073788cc7ee81ebd8d72b623a24e67d9c3c3e5d0d3cab71ec870e9c457fc1ce30508c72869b1182bd749cb4fa54d21470049b706cefd1ed0
data/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [1.12.1] - 2022-05-09
8
+
9
+ * Allow inertia to take over after initial pageload when using ssr. Thanks @99monkey!
10
+
7
11
  ## [1.12.0] - 2022-05-04
8
12
 
9
13
  * SSR!
@@ -17,13 +17,12 @@ module InertiaRails
17
17
  end
18
18
 
19
19
  def render
20
- return render_ssr if ::InertiaRails.ssr_enabled?
21
-
22
20
  if @request.headers['X-Inertia']
23
21
  @response.set_header('Vary', 'Accept')
24
22
  @response.set_header('X-Inertia', 'true')
25
23
  @render_method.call json: page, status: @response.status, content_type: Mime[:json]
26
24
  else
25
+ return render_ssr if ::InertiaRails.ssr_enabled? rescue nil
27
26
  @render_method.call template: 'inertia', layout: ::InertiaRails.layout, locals: (view_data).merge({page: page})
28
27
  end
29
28
  end
@@ -1,3 +1,3 @@
1
1
  module InertiaRails
2
- VERSION = "1.12.0"
2
+ VERSION = "1.12.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inertia_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.12.0
4
+ version: 1.12.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brian Knoles
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2022-05-04 00:00:00.000000000 Z
13
+ date: 2022-05-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails