bullet_train 1.2.13 → 1.2.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docs/super-scaffolding.md +4 -2
- data/lib/bullet_train/version.rb +1 -1
- data/lib/bullet_train.rb +8 -6
- metadata +2 -3
- data/app/views/account/teams/show.html.erb +0 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c463276e19b14feeb9f7ccf1cb5f50942fa77e89a3023a4d51606f42c18a2dea
|
4
|
+
data.tar.gz: d56d1491bb9412849f63b371c0d4f0d3c2b7da60d912d5dca232d2ceaa8273ac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 39ec0403861c83a9494675744a649eed2bf24d4cbf4f6b0fd53bc9d22c5a81ea91c8cafdd221f39059424a6db9fbdde800f48a175639b481185e709ebe599634
|
7
|
+
data.tar.gz: f1225aa6d34108876c6398d7c5062b713d85e42c9cd4de24363f6dd0b734ad7cc72bd6d9489d9ee27e7d64431ce374dd4a04db141a927553119e4e21c1f3c6cc
|
data/docs/super-scaffolding.md
CHANGED
@@ -232,12 +232,14 @@ Honestly, it's crazy that we got to the point where we can handle this particula
|
|
232
232
|
|
233
233
|
### `TangibleThing` and `CreativeConcept`
|
234
234
|
|
235
|
-
In order to properly facilitate this type of code generation, Bullet Train includes two models in the `Scaffolding` namespace:
|
235
|
+
In order to properly facilitate this type of code generation, Bullet Train includes two models in the `Scaffolding` namespace as a parent and child model:
|
236
236
|
|
237
237
|
1. `Scaffolding::AbsolutelyAbstract::CreativeConcept`
|
238
238
|
2. `Scaffolding::CompletelyConcrete::TangibleThing`
|
239
239
|
|
240
|
-
Their peculiar naming is what's required to ensure that their corresponding view and controller templates can serve as the basis for any combination of different model naming or [namespacing](https://blog.bullettrain.co/rails-model-namespacing/) that you may need to employ in your own application.
|
240
|
+
Their peculiar naming is what's required to ensure that their corresponding view and controller templates can serve as the basis for any combination of different model naming or [namespacing](https://blog.bullettrain.co/rails-model-namespacing/) that you may need to employ in your own application. There are [a ton of different potential combinations of parent and child namespaces](https://blog.bullettrain.co/nested-namespaced-rails-routing-examples/), and these two class names provide us with the fidelity we need when transforming the templates to represent any of these scenarios.
|
241
|
+
|
242
|
+
Only the files associated with `Scaffolding::CompletelyConcrete::TangibleThing` actually serve as scaffolding templates, so we also take advantage of `Scaffolding::AbsolutelyAbstract::CreativeConcept` to demonstrate other available Bullet Train features. For example, we use it to demonstrate how to implement resource-level collaborators.
|
241
243
|
|
242
244
|
### Hiding Scaffolding Templates
|
243
245
|
|
data/lib/bullet_train/version.rb
CHANGED
data/lib/bullet_train.rb
CHANGED
@@ -50,12 +50,14 @@ module BulletTrain
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def default_url_options_from_base_url
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
53
|
+
ENV["BASE_URL"] ||= if ENV["HEROKU_APP_NAME"]
|
54
|
+
"https://#{ENV["HEROKU_APP_NAME"]}.herokuapp.com"
|
55
|
+
elsif ENV["RENDER_EXTERNAL_URL"]
|
56
|
+
ENV["RENDER_EXTERNAL_URL"]
|
57
|
+
elsif Rails.env.development?
|
58
|
+
"http://localhost:3000"
|
59
|
+
else
|
60
|
+
raise "you need to define the value of ENV['BASE_URL'] in your environment. if you're on heroku, you can do this with `heroku config:add BASE_URL=https://your-app-name.herokuapp.com` (or whatever your configured domain is)."
|
59
61
|
end
|
60
62
|
|
61
63
|
parsed_base_url = URI.parse(ENV["BASE_URL"])
|
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.2.
|
4
|
+
version: 1.2.15
|
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-03-
|
11
|
+
date: 2023-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|
@@ -566,7 +566,6 @@ files:
|
|
566
566
|
- app/views/account/teams/edit.html.erb
|
567
567
|
- app/views/account/teams/index.html.erb
|
568
568
|
- app/views/account/teams/new.html.erb
|
569
|
-
- app/views/account/teams/show.html.erb
|
570
569
|
- app/views/account/two_factors/create.js.erb
|
571
570
|
- app/views/account/two_factors/destroy.js.erb
|
572
571
|
- app/views/account/two_factors/verify.js.erb
|
@@ -1,25 +0,0 @@
|
|
1
|
-
<%= render 'account/shared/page' do |p| %>
|
2
|
-
<% p.content_for :title, t('.header', teams_possessive: possessive_string(@team.name)) %>
|
3
|
-
|
4
|
-
<% p.content_for :actions do %>
|
5
|
-
<%= link_to edit_account_team_path(@team), class: 'button-secondary button-smaller' do %>
|
6
|
-
<%= t('teams.buttons.edit') %>
|
7
|
-
<% end if can? :edit, @team %>
|
8
|
-
<% end %>
|
9
|
-
|
10
|
-
<% p.content_for :body do %>
|
11
|
-
<%# 🚅 super scaffolding will insert new children above this line. %>
|
12
|
-
|
13
|
-
<% unless scaffolding_things_disabled? %>
|
14
|
-
<%= render 'account/shared/commentary/box' do |p| %>
|
15
|
-
<% p.content_for :content do %>
|
16
|
-
<%= render 'account/scaffolding/absolutely_abstract/creative_concepts/index', creative_concepts: @team.scaffolding_absolutely_abstract_creative_concepts, hide_back: true unless scaffolding_things_disabled? %>
|
17
|
-
<% end %>
|
18
|
-
|
19
|
-
<% p.content_for :commentary do %>
|
20
|
-
<%= t('scaffolding/absolutely_abstract/creative_concepts.index.commentary').html_safe %>
|
21
|
-
<% end %>
|
22
|
-
<% end %>
|
23
|
-
<% end %>
|
24
|
-
<% end %>
|
25
|
-
<% end %>
|