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 +4 -4
- data/.claude/skills/plutonium-resource/SKILL.md +14 -0
- data/CHANGELOG.md +23 -0
- data/app/assets/plutonium.css +1 -1
- data/docs/.vitepress/theme/components/HomeCta.vue +2 -2
- data/docs/public/templates/base.rb +1 -1
- data/docs/public/templates/lite.rb +9 -9
- data/docs/public/templates/plutonium.rb +10 -7
- data/docs/reference/resource/query.md +20 -0
- data/gemfiles/rails_7.gemfile.lock +1 -1
- data/gemfiles/rails_8.0.gemfile.lock +1 -1
- data/gemfiles/rails_8.1.gemfile.lock +1 -1
- data/lib/generators/pu/core/assets/assets_generator.rb +17 -0
- data/lib/generators/pu/rodauth/templates/config/initializers/url_options.rb +7 -13
- data/lib/plutonium/core/controllers/entity_scoping.rb +4 -1
- data/lib/plutonium/interaction/base.rb +7 -9
- data/lib/plutonium/invites/concerns/invite_token.rb +1 -1
- data/lib/plutonium/resource/controller.rb +15 -0
- data/lib/plutonium/resource/controllers/interactive_actions.rb +11 -0
- data/lib/plutonium/resource/query_object.rb +13 -1
- data/lib/plutonium/ui/modal/slideover.rb +1 -1
- data/lib/plutonium/ui/table/components/scopes_bar.rb +2 -1
- data/lib/plutonium/ui/table/components/scopes_pills.rb +1 -1
- data/lib/plutonium/version.rb +1 -1
- data/package.json +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0dbc2397e69b01d4570b44352873ed678884596e42fb6e9187d73c757ef12cb5
|
|
4
|
+
data.tar.gz: '049b9ee55a141c38c0544de18a2a39ed02e22d56aeb3f6076fdff4938bb1eff4'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|