backstage 0.1.8 → 0.1.9

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: a95cb9d0fe59db65f803f3a94cfd9988cc6236fc5d00343f9c48c7b8814e631e
4
- data.tar.gz: 5e0315f646f94ebaa48b940fdbfb5d6c5d81b234d05cb3979c68f5d491a3cf43
3
+ metadata.gz: 3c718b48851548675ae86452a060e6b6c18a21e712e4ea9cfb3f68379ce2828c
4
+ data.tar.gz: ddc6fa00de9252402b7b4c5c86cac775f320d5ffd8d1457d07c909da72373575
5
5
  SHA512:
6
- metadata.gz: 84443088f024a1753e5fe91a4316ee8584c926cb89c37fd0120abf638eec19dcdd576c9e74f5e8422b992337f0cfa7e67eb860bb47975adcf2280de504c7dc6e
7
- data.tar.gz: 4a956b36f185f3b1b0fc0110bbf053de67699e3c7fdcee2ffbd0d1664e36ce8f929b39a941ada0e3beca0abf2d98dd10f53b9b84e5853f351cfd2f2212d2f712
6
+ metadata.gz: 20732846dea13229b3c45c2dccea6b689401bf627031ca9da44774e9738421def5fdd4cb2a53d46783ec53185fedc76742246ea40123883ac1822ab114086286
7
+ data.tar.gz: fb271699d1ed51adf18b1891f0d9989d3660ab7cfeea1606f57cc882ef8bfbd73a6bc7a3613acff14c901413044c4476c348c4638b36c6bfe70afd4cd0582bb2
data/CHANGELOG.md CHANGED
@@ -7,6 +7,12 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.1.9] — 2026-05-24
11
+
12
+ ### Fixed
13
+
14
+ - `belongs_to` and `field` no longer append to `index_fields` when `fields(...)` has already been called explicitly; previously calling `c.fields :name, :address` then `c.field :col, as: :tristate_boolean` would silently add the new field back onto the index list
15
+
10
16
  ## [0.1.8] — 2026-05-23
11
17
 
12
18
  ### Fixed
@@ -31,6 +31,7 @@ module Backstage
31
31
  attr_reader :sidebar_config
32
32
 
33
33
  def fields(*names)
34
+ @index_fields_explicit = true
34
35
  @index_fields = names.map { |n| find_or_build_field(n) }
35
36
  end
36
37
 
@@ -63,7 +64,7 @@ module Backstage
63
64
  @edit_fields.reject! { |f| f.name == fk_field.name }
64
65
  @index_fields.reject! { |f| f.name == fk_field.name || f.name == index_field.name }
65
66
  @edit_fields << fk_field
66
- @index_fields << index_field
67
+ @index_fields << index_field unless @index_fields_explicit
67
68
  end
68
69
 
69
70
  def field(name, **opts)
@@ -76,7 +77,7 @@ module Backstage
76
77
  else
77
78
  new_field = Field.new(sym, type || :string, opts)
78
79
  @edit_fields << new_field
79
- @index_fields << new_field
80
+ @index_fields << new_field unless @index_fields_explicit
80
81
  end
81
82
  end
82
83
 
@@ -1,3 +1,3 @@
1
1
  module Backstage
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backstage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gareth James
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-05-23 00:00:00.000000000 Z
11
+ date: 2026-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties