bullet_train-super_scaffolding 1.7.18 → 1.7.19
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e545ccf981ebe2c1bd0e61771a8aad5e14a1576eb96580bbe994e0ac3d027188
|
4
|
+
data.tar.gz: 4ff0fe275eadd14996208534092be11b6ad55a0d972e68af1a4a9d675e38bb0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c21b8c85be5c66c6d04b739cd556890536da55fbe20079651291db195a436de1164edb06c6effbea049557130c3bc21f0bc1552e3341bb753a86b1391d668113
|
7
|
+
data.tar.gz: ba94616e6d888e3d450f53eddab1d3fa13281cdbf1f2e148c767f8b639474bb89ba53ca50b7c850103d4ac74102e2e96f0d1fdd3366785f072d9a06084be447a
|
@@ -0,0 +1,17 @@
|
|
1
|
+
Description:
|
2
|
+
Generate files needed to add conversations to a model.
|
3
|
+
|
4
|
+
Example:
|
5
|
+
E.g. Add conversations to Posts from a Team.
|
6
|
+
rails generate super_scaffold:conversations Post Team
|
7
|
+
|
8
|
+
This will create:
|
9
|
+
db/migrate/20240716162627_add_project_to_conversations.rb
|
10
|
+
And update:
|
11
|
+
app/models/ability.rb
|
12
|
+
app/models/conversation.rb
|
13
|
+
app/models/project.rb
|
14
|
+
app/views/account/projects/show.html.erb
|
15
|
+
|
16
|
+
🏆 Protip: Commit your other changes before running Super Scaffolding so it's easy to undo if you (or we) make any mistakes.
|
17
|
+
If you do that, you can reset to your last commit state by using `git checkout .` and `git clean -d -f`.
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require_relative "../super_scaffold_base"
|
2
|
+
require "scaffolding/routes_file_manipulator"
|
3
|
+
|
4
|
+
class ConversationsGenerator < Rails::Generators::Base
|
5
|
+
include SuperScaffoldBase
|
6
|
+
|
7
|
+
source_root File.expand_path("templates", __dir__)
|
8
|
+
|
9
|
+
namespace "super_scaffold:conversations"
|
10
|
+
|
11
|
+
argument :target_model
|
12
|
+
argument :parent_model
|
13
|
+
|
14
|
+
def generate
|
15
|
+
if defined?(BulletTrain::Conversations)
|
16
|
+
# We add the name of the specific super_scaffolding command that we want to
|
17
|
+
# invoke to the beginning of the argument string.
|
18
|
+
ARGV.unshift "conversations"
|
19
|
+
BulletTrain::SuperScaffolding::Runner.new.run
|
20
|
+
else
|
21
|
+
puts "You must have Conversations installed if you want to use this generator.".red
|
22
|
+
puts "Please refer to the documentation for more information: https://bullettrain.co/docs/conversations"
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
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.7.
|
4
|
+
version: 1.7.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Culver
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07-
|
11
|
+
date: 2024-07-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: standard
|
@@ -174,6 +174,8 @@ files:
|
|
174
174
|
- lib/generators/super_scaffold/action_models/targets_one/targets_one_generator.rb
|
175
175
|
- lib/generators/super_scaffold/action_models/targets_one_parent/USAGE
|
176
176
|
- lib/generators/super_scaffold/action_models/targets_one_parent/targets_one_parent_generator.rb
|
177
|
+
- lib/generators/super_scaffold/conversations/USAGE
|
178
|
+
- lib/generators/super_scaffold/conversations/conversations_generator.rb
|
177
179
|
- lib/generators/super_scaffold/field/USAGE
|
178
180
|
- lib/generators/super_scaffold/field/field_generator.rb
|
179
181
|
- lib/generators/super_scaffold/incoming_webhooks/USAGE
|