bullet_train 1.6.9 → 1.6.11
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/app/models/concerns/memberships/base.rb +0 -2
- data/app/models/concerns/users/base.rb +0 -17
- data/app/views/layouts/public.html.erb +2 -23
- data/docs/field-partials/dynamic-forms-dependent-fields.md +2 -2
- data/lib/bullet_train/resolver.rb +11 -4
- data/lib/bullet_train/version.rb +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: bff6a45a565faac32222a58cb41772a3a261dea92141b375ab78e401a4e46d52
|
4
|
+
data.tar.gz: b8d5b7931700134781d3a89f0139c335e0d5688a1f8d2b6f2aa3420ca6d46b07
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12ab458d7ea3bd7461d24f3707ef2ab73fb021384ddd82044bde9dee49f12ed953b0e87a6f3ec5603c8f3e7a9455bed661dad026ccc94a329164c778e02d0644
|
7
|
+
data.tar.gz: 7cc05779a3cc527f9f91316e87fba70b4c58889728a9f9620f5a7a7a7d84b0f4e2de68bfd97f9838ca9dbabb3beb3adafcaa49534e5eeec90e024abdde34b8c5
|
@@ -16,8 +16,6 @@ module Memberships::Base
|
|
16
16
|
has_many :scaffolding_completely_concrete_tangible_things_assignments, class_name: "Scaffolding::CompletelyConcrete::TangibleThings::Assignment", dependent: :destroy
|
17
17
|
has_many :scaffolding_completely_concrete_tangible_things, through: :scaffolding_completely_concrete_tangible_things_assignments, source: :tangible_thing
|
18
18
|
|
19
|
-
has_many :scaffolding_absolutely_abstract_creative_concepts_collaborators, class_name: "Scaffolding::AbsolutelyAbstract::CreativeConcepts::Collaborator", dependent: :destroy
|
20
|
-
|
21
19
|
# Image uploading
|
22
20
|
has_one_attached :user_profile_photo
|
23
21
|
|
@@ -20,7 +20,6 @@ module Users::Base
|
|
20
20
|
|
21
21
|
# teams
|
22
22
|
has_many :memberships, dependent: :destroy
|
23
|
-
has_many :scaffolding_absolutely_abstract_creative_concepts_collaborators, through: :memberships
|
24
23
|
has_many :teams, through: :memberships
|
25
24
|
has_many :collaborating_users, through: :teams, source: :users
|
26
25
|
belongs_to :current_team, class_name: "Team", optional: true
|
@@ -144,22 +143,6 @@ module Users::Base
|
|
144
143
|
RQRCode::QRCode.new(otp_provisioning_uri(label, issuer: issuer))
|
145
144
|
end
|
146
145
|
|
147
|
-
def scaffolding_absolutely_abstract_creative_concepts_collaborators
|
148
|
-
Scaffolding::AbsolutelyAbstract::CreativeConcepts::Collaborator.joins(:membership).where(membership: {user_id: id})
|
149
|
-
end
|
150
|
-
|
151
|
-
def admin_scaffolding_absolutely_abstract_creative_concepts_ids
|
152
|
-
scaffolding_absolutely_abstract_creative_concepts_collaborators.admins.pluck(:creative_concept_id)
|
153
|
-
end
|
154
|
-
|
155
|
-
def editor_scaffolding_absolutely_abstract_creative_concepts_ids
|
156
|
-
scaffolding_absolutely_abstract_creative_concepts_collaborators.editors.pluck(:creative_concept_id)
|
157
|
-
end
|
158
|
-
|
159
|
-
def viewer_scaffolding_absolutely_abstract_creative_concepts_ids
|
160
|
-
scaffolding_absolutely_abstract_creative_concepts_collaborators.viewers.pluck(:creative_concept_id)
|
161
|
-
end
|
162
|
-
|
163
146
|
def developer?
|
164
147
|
return false unless ENV["DEVELOPER_EMAILS"]
|
165
148
|
# we use email_was so they can't try setting their email to the email of an admin.
|
@@ -4,28 +4,7 @@
|
|
4
4
|
<%= render 'shared/layouts/head' %>
|
5
5
|
</head>
|
6
6
|
|
7
|
-
<body class="min-h-screen <%= BulletTrain::Themes::Light.background
|
8
|
-
|
9
|
-
<div class="h-screen md:h-auto md:rounded-lg flex shadow main-container">
|
10
|
-
|
11
|
-
<% if BulletTrain::Themes::Light.navigation == :left %>
|
12
|
-
<div class="hidden lg:flex lg:flex-shrink-0 bg-gradient-to-b from-primary-700 to-primary-800 dark:from-slate-800 dark:to-slate-800 md:rounded-l-lg">
|
13
|
-
<div class="w-64">
|
14
|
-
<%= render "account/shared/menu/sidebar" %>
|
15
|
-
</div>
|
16
|
-
</div>
|
17
|
-
<% end %>
|
18
|
-
|
19
|
-
<div class="flex flex-col w-0 flex-1 bg-slate-100 dark:bg-slate-800 dark:border-slate-500 md:rounded-lg <%= BulletTrain::Themes::Light.navigation == :left ? "lg:border-l lg:rounded-l-none" : "" %>">
|
20
|
-
<main class="flex-1 relative z-0 focus:outline-none" tabindex="0">
|
21
|
-
<div class="py-2 px-1">
|
22
|
-
<div class="mx-auto px-4 sm:px-6 py-4">
|
23
|
-
<%= yield %>
|
24
|
-
</div>
|
25
|
-
</div>
|
26
|
-
</main>
|
27
|
-
</div>
|
28
|
-
</div>
|
29
|
-
</div>
|
7
|
+
<body class="min-h-screen <%= BulletTrain::Themes::Light.background %> text-slate-700 text-sm font-normal dark:text-slate-300">
|
8
|
+
<%= yield %>
|
30
9
|
</body>
|
31
10
|
</html>
|
@@ -72,7 +72,7 @@ What if you'd instead want to:
|
|
72
72
|
|
73
73
|
* Not rely on a custom Stimulus controller to control the `disabled` state of the "Other" field
|
74
74
|
* Show/hide multiple dependent fields based on the value of the `dependable` field.
|
75
|
-
* Update more than the field itself, but also the value of its `label`. As an example, the [`address_field`](/docs/field-partials/address-field.md) partial shows an empty "State / Province / Region" sub-field by default, and on changing the `:country_id` field to the United States, changes the whole `:region_id` to "State" as its label and with all US States as its choices.
|
75
|
+
* Update more than the field itself, but also the value of its `label`. As an example, the [`address_field`](/docs/field-partials/address-field.md) partial shows an empty "State / Province / Region" sub-field by default, and on changing the `:country_id` field to the United States, changes the whole `:region_id` to "State or Territory" as its label and with all US States and territories as its choices.
|
76
76
|
|
77
77
|
For these situations, Bullet Train has a `dependent_fields_frame` partial that's made to listen to `dependable:updated` events by default.
|
78
78
|
|
@@ -120,4 +120,4 @@ We'll move the conditional on the `disabled` property. And we'll also let the `d
|
|
120
120
|
<% end %>
|
121
121
|
```
|
122
122
|
|
123
|
-
To learn more about its inner functionality, search the `bullet-train-core` repo for `dependable_controller.js`, `dependent_fields_frame_controller.js` and `_dependent_fields_frame.html.erb`. You can also see an implementation by looking at the `_address_field.html.erb` partial.
|
123
|
+
To learn more about its inner functionality, search the `bullet-train-core` repo for `dependable_controller.js`, `dependent_fields_frame_controller.js` and `_dependent_fields_frame.html.erb`. You can also see an implementation by looking at the `_address_field.html.erb` partial.
|
@@ -14,10 +14,17 @@ module BulletTrain
|
|
14
14
|
source_file[:relative_path] = nil
|
15
15
|
|
16
16
|
if source_file[:absolute_path]
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
17
|
+
if File.exist?(source_file[:absolute_path])
|
18
|
+
puts "" # standard:disable Style/IdenticalConditionalBranches
|
19
|
+
puts "Absolute path:".green
|
20
|
+
puts " #{source_file[:absolute_path]}".green
|
21
|
+
puts ""
|
22
|
+
else
|
23
|
+
puts "" # standard:disable Style/IdenticalConditionalBranches
|
24
|
+
puts "Sorry, we could not find the file you're looking for.".red
|
25
|
+
puts "Please check the path and try again.".red
|
26
|
+
exit 1
|
27
|
+
end
|
21
28
|
|
22
29
|
source_file[:relative_path] = source_file[:absolute_path].split(/(?=#{source_file[:package_name]})/).pop
|
23
30
|
|
data/lib/bullet_train/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bullet_train
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.6.
|
4
|
+
version: 1.6.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-11-
|
11
|
+
date: 2023-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|