4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/help/model.rb', line 4
def run
puts "Options:
You have the abliity to enter an api-version through namespaces.
You can generate your controller in your nmespace directory.
By default the value is 'api/v1'
Enter your namespace directory-path from controllers directory without
a starting '/' in this option.
--api-version=(namespace-directory-path-from-controllers-directory)
Example:
--api-version=api/v2
Same command as:
rails generate model <model-name>
If you use mini test with Rails by default, you can generate the test and your routes with
the option:
--with-test
With your generated controller
Run to generate your model, migration, and controller:
'railspp model (model-name) (models-options) (your-api-version-flag)'
"
end
|