bullet_train-super_scaffolding 1.1.10 → 1.1.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3a171f4aefd9c6db04356efc8f487b2092232f8d2d912d977d4cdafc960017fd
4
- data.tar.gz: eebe41554796b43c421dd8bcec48feada93eb3b1139e965f32580fb1783ced08
3
+ metadata.gz: dbc3bffacb36c6b70acfc20da8781f9a779d97d11b2fb3a491e12f45317b73bc
4
+ data.tar.gz: 7ef0d828a857e7aabcf5e99bc7e53ddc468979473d7de5cc91e8b9354a2a7d2a
5
5
  SHA512:
6
- metadata.gz: be433900749c9a05d339867c7b2e1d8eb76dee09b7a5c6577a579326abaacb4aa482ce1b5541f174c4167815571a239c276ff2dbbab101847d53ea9d066f96f7
7
- data.tar.gz: e3213f8de2018f14b497d5f6f3875a161479d31079b4611eaf13a39d3c7876dcfa1d02da2ca61e9a2bacdd1409ce00916850c6a1e6a390926b69c782931502b5
6
+ metadata.gz: 1520f585a5f0022358f54721739b4ac0e541520e430e38a7cd258b7a99564bce8b8df7da4bec921a854240eb3f8e47d353c44d07e2a73f0b8b57b2aea5d7017a
7
+ data.tar.gz: 06221d25c6bf475fb8a95c8d040706e2705e2152c5be733e71d793799e48f393bd52e6c8c352335b9e82e2d2244f5f11818ba9cd203ca05df780b96e65c7a6f8
@@ -0,0 +1,54 @@
1
+ class Api::V1::Scaffolding::AbsolutelyAbstract::CreativeConceptsController < Api::V1::ApplicationController
2
+ account_load_and_authorize_resource :creative_concept, through: :team, through_association: :scaffolding_absolutely_abstract_creative_concepts
3
+
4
+ # GET /api/v1/teams/:team_id/absolutely_abstract/creative_concepts
5
+ def index
6
+ end
7
+
8
+ # GET /api/v1/scaffolding/absolutely_abstract/creative_concepts/:id
9
+ def show
10
+ end
11
+
12
+ # POST /api/v1/teams/:team_id/absolutely_abstract/creative_concepts
13
+ def create
14
+ if @creative_concept.save
15
+ render :show, status: :created, location: [:api, :v1, @creative_concept]
16
+ else
17
+ render json: @creative_concept.errors, status: :unprocessable_entity
18
+ end
19
+ end
20
+
21
+ # PATCH/PUT /api/v1/scaffolding/absolutely_abstract/creative_concepts/:id
22
+ def update
23
+ if @creative_concept.update(creative_concept_params)
24
+ render :show
25
+ else
26
+ render json: @creative_concept.errors, status: :unprocessable_entity
27
+ end
28
+ end
29
+
30
+ # DELETE /api/v1/scaffolding/absolutely_abstract/creative_concepts/:id
31
+ def destroy
32
+ @creative_concept.destroy
33
+ end
34
+
35
+ private
36
+
37
+ module StrongParameters
38
+ # Only allow a list of trusted parameters through.
39
+ def creative_concept_params
40
+ strong_params = params.require(:scaffolding_absolutely_abstract_creative_concept).permit(
41
+ *permitted_fields,
42
+ :name,
43
+ :description,
44
+ *permitted_arrays
45
+ )
46
+
47
+ process_params(strong_params)
48
+
49
+ strong_params
50
+ end
51
+ end
52
+
53
+ include StrongParameters
54
+ end
@@ -0,0 +1,6 @@
1
+ json.extract! creative_concept,
2
+ :id,
3
+ :name,
4
+ :description,
5
+ :created_at,
6
+ :updated_at
@@ -0,0 +1 @@
1
+ json.array! @creative_concepts, partial: "api/v1/scaffolding/absolutely_abstract/creative_concepts/creative_concept", as: :creative_concept
@@ -0,0 +1 @@
1
+ json.partial! "api/v1/scaffolding/absolutely_abstract/creative_concepts/creative_concept", creative_concept: @creative_concept
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module SuperScaffolding
3
- VERSION = "1.1.10"
3
+ VERSION = "1.1.12"
4
4
  end
5
5
  end
@@ -149,6 +149,17 @@ class Scaffolding::Transformer
149
149
  ].each do |needle|
150
150
  string = string.gsub(needle, encode_double_replacement_fix(class_names_transformer.replacement_for(needle)))
151
151
  end
152
+
153
+ {
154
+ "/v1/" => "/#{BulletTrain::Api.current_version}/",
155
+ "::V1::" => "::#{BulletTrain::Api.current_version}::",
156
+ "_v1_" => "_#{BulletTrain::Api.current_version}_",
157
+ ":v1," => ":#{BulletTrain::Api.current_version},"
158
+ }.each do |from, to|
159
+ string = string.gsub(from.upcase, encode_double_replacement_fix(to.upcase))
160
+ string = string.gsub(from.downcase, encode_double_replacement_fix(to.downcase))
161
+ end
162
+
152
163
  decode_double_replacement_fix(string)
153
164
  end
154
165
 
@@ -811,7 +822,7 @@ class Scaffolding::Transformer
811
822
  end
812
823
 
813
824
  if type == "color_picker"
814
- field_options[:color_picker_options] = "t('#{child.pluralize.underscore}.fields.color_picker_value.options')"
825
+ field_options[:color_picker_options] = "t('#{child.pluralize.underscore}.fields.#{name}.options')"
815
826
  end
816
827
 
817
828
  # TODO: This feels incorrect.
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train-super_scaffolding
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.10
4
+ version: 1.1.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Culver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-11-03 00:00:00.000000000 Z
11
+ date: 2022-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard
@@ -85,6 +85,7 @@ files:
85
85
  - app/controllers/api/v1.rb
86
86
  - app/controllers/api/v1/scaffolding.rb
87
87
  - app/controllers/api/v1/scaffolding/absolutely_abstract.rb
88
+ - app/controllers/api/v1/scaffolding/absolutely_abstract/creative_concepts_controller.rb
88
89
  - app/controllers/api/v1/scaffolding/completely_concrete.rb
89
90
  - app/controllers/api/v1/scaffolding/completely_concrete/tangible_things_controller.rb
90
91
  - app/controllers/concerns/scaffolding/absolutely_abstract/creative_concepts/controller_support.rb
@@ -130,6 +131,9 @@ files:
130
131
  - app/views/account/scaffolding/completely_concrete/tangible_things/show.html.erb
131
132
  - app/views/api/v1/open_api/scaffolding/completely_concrete/tangible_things/_components.yaml.erb
132
133
  - app/views/api/v1/open_api/scaffolding/completely_concrete/tangible_things/_paths.yaml.erb
134
+ - app/views/api/v1/scaffolding/absolutely_abstract/creative_concepts/_creative_concept.json.jbuilder
135
+ - app/views/api/v1/scaffolding/absolutely_abstract/creative_concepts/index.json.jbuilder
136
+ - app/views/api/v1/scaffolding/absolutely_abstract/creative_concepts/show.json.jbuilder
133
137
  - app/views/api/v1/scaffolding/completely_concrete/tangible_things/_tangible_thing.json.jbuilder
134
138
  - app/views/api/v1/scaffolding/completely_concrete/tangible_things/index.json.jbuilder
135
139
  - app/views/api/v1/scaffolding/completely_concrete/tangible_things/show.json.jbuilder