nti_receipt_builder 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4493131823c3d523ede3d5e0c57b77caf81245f191dca1019ba5536cdf1dbc55
4
- data.tar.gz: ce594bac64cd068754246e4cf62b90eed741e87c3dc5224dcdd570da267616db
3
+ metadata.gz: cc55ec31eafe88d4a1eccc9f242d5307e147694ab0269aa91339ad70436522ca
4
+ data.tar.gz: 002fca8fe80364ac24a8aa3e8903d05ecaa42dd019669e0e2e25d8f7fb187133
5
5
  SHA512:
6
- metadata.gz: e8b7e1012da9720f4bba538fd3363a93fe4d349c75f6fd8de4c7d66c5dbc094c08b62603e643ebd19579494af386ed9931e9551dab09193cf2becf610006bbce
7
- data.tar.gz: 916a9a7b7f8d7101e663227821564cd5d9391352189c95e465e16d5bd41069cbbcef1cfc915c17dcd481a70f7aac3e7ab37112619439b9b4c33adbc16ec5f61b
6
+ metadata.gz: b08c5ae2d936a04d3641c3d2db799f94ec5ecee8c7d56e72c8990151b8ea8511cb5dd29edf7b28f0e5b1872b8e106be6b6a8977361622096a26b3e45de3041fc
7
+ data.tar.gz: 1170210bcf470da02886f3593eca8c6a4f7cc1b5bfbeefce6ad97efed9125be1b6d818cc8df98cdf7089cc6d3354bec7c58f4fbc7532dd27861cb050cb71a1f8
@@ -84,6 +84,11 @@ module NtiReceiptBuilder
84
84
 
85
85
  @draft = @receipt_template.dup
86
86
  @draft.assign_attributes(form.attributes.except(:lock_version))
87
+ # A preview is never anyone's default. `dup` copies the flag, so a host enforcing one
88
+ # default per owner saw the unsaved draft collide with the very record it was copied from,
89
+ # and Live Preview failed on precisely the templates most likely to be previewed. Clearing
90
+ # it cannot change the render — nothing in the layout or geometry reads it.
91
+ @draft.is_default = false
87
92
 
88
93
  if !form.valid?
89
94
  @render_result = nil
@@ -1,4 +1,4 @@
1
- <%= turbo_stream.open_modal size: 'modal-lg' do %>
1
+ <%= turbo_stream.open_modal size: 'modal-xl' do %>
2
2
  <div class="modal-header">
3
3
  <h1 class="modal-title">Live Preview</h1>
4
4
  <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NtiReceiptBuilder
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nti_receipt_builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Den Meralpis