plutonium 0.56.3 → 0.58.0

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: 04d75fe79d357ced0ecab559d0bfaecb983b154e26514821c79dea4f4802760c
4
- data.tar.gz: 1ee5de3479c6e5068d5794a1ff3319524e3ad0fee51f6880a679e466f1a45c61
3
+ metadata.gz: 0dbc2397e69b01d4570b44352873ed678884596e42fb6e9187d73c757ef12cb5
4
+ data.tar.gz: '049b9ee55a141c38c0544de18a2a39ed02e22d56aeb3f6076fdff4938bb1eff4'
5
5
  SHA512:
6
- metadata.gz: 7be572db5f7c2fa4a2748e9b1cb279b5e5d07c2ba3ab1fb6262634be53723472d33432c2feeb89b117e45a5755f5a2ce127f298712d768ec0c76fefee783bacf
7
- data.tar.gz: c6dd8076fdf02d887581c456268f803982f00fc5b49d22be6b88f5dee8e059efa030164e74800e68b40836976e6dd3aa70cabf2197c19db7965b362b50a1a8cb
6
+ metadata.gz: b47bf5a27f2a89a4ea705baf78cb34bd17bdb9270bdd386e5d0fa30e601744632945ca451ba019ad4788626702d667a67b848306c4fcc38d29ebd70bbbbc9c12
7
+ data.tar.gz: 02ee1e16fe6fc058f14295a54d2a5db2e52c9a65f2d26d5ab988a1b9bdb379c7d1eb32d2b1cc24482c1bae19628e0629bc5a536d64865a893d7b2291ab0e1389
@@ -978,6 +978,20 @@ scope(:mine) { |s| s.where(author: current_user) }
978
978
  default_scope :published # applied on initial load; "All" button clears it
979
979
  ```
980
980
 
981
+ ### Conditional scopes (`condition:`)
982
+
983
+ Like `condition:` on actions and fields — define a scope but only **render its button** when a proc is truthy. The scope itself (and its URL) stays live; `condition:` only controls UI visibility.
984
+
985
+ ```ruby
986
+ scope :admin_only, condition: -> { current_user.admin? }
987
+ scope :beta_feature, condition: -> { params[:beta] == "1" }
988
+ scope :never_shown, condition: -> { false } # hides button but URL still works
989
+ ```
990
+
991
+ The proc is evaluated against the view context — `current_user`, `params`, `request`, `allowed_to?` are all available directly. There is no `object`/`record` (scopes have no single-record context).
992
+
993
+ 🚨 **`condition:` is NOT authorization.** A hidden scope button still has a live URL. Use `condition:` for UI relevance ("show admins only this tab"). Use the policy's `relation_scope` for "who can see these records at all".
994
+
981
995
  ## Sorting
982
996
 
983
997
  ```ruby
data/CHANGELOG.md CHANGED
@@ -1,3 +1,26 @@
1
+ ## [0.58.0] - 2026-06-10
2
+
3
+ ### 🐛 Bug Fixes
4
+
5
+ - *(rodauth)* Set url_options directly on ActionMailer::Base instead of config
6
+ - *(interaction)* Short-circuit call with failure when validation fails
7
+ - *(form)* Pre-populate extraction record so conditioned selects resolve correctly
8
+ - *(invites)* Use after_commit to avoid orphaned email jobs on rollback
9
+ ## [0.57.0] - 2026-06-09
10
+
11
+ ### 🚀 Features
12
+
13
+ - *(scopes)* Add display-only condition: to scopes
14
+
15
+ ### 🐛 Bug Fixes
16
+
17
+ - *(generators/assets)* Guard tailwind prerequisite and fix landing page command
18
+ - *(entity_scoping)* Guard against nil current_scoped_entity in remember_scoped_entity
19
+ - *(ui/slideover)* Use dynamic viewport height to prevent clipping on mobile
20
+
21
+ ### ⚙️ Miscellaneous Tasks
22
+
23
+ - *(templates)* Add skill sync to plutonium template and use conventional commits
1
24
  ## [0.56.3] - 2026-06-07
2
25
 
3
26
  ### 🐛 Bug Fixes