rhino_project_core 0.30.0.alpha.35 → 0.30.0.alpha.36
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/lib/generators/rhino/ui/route/route_generator.rb +9 -4
- data/lib/rhino/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46eb1594ceaa5af1f44c3da2999a556ec8720db20917cdcd49d0802a395d3576
|
4
|
+
data.tar.gz: f40d593b3a6bf6fc1e964f3aeb3020d2201b582e5e4b8f3b305926b319b92324
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc8752c09b6aa70efd3e87fd4ad9c3fbeb953c9de5d44e39e89d67c71c024fd1ef3be49967db1ef720f4252ad46d18f508838dfa55b889937bd722b368ab4c0d
|
7
|
+
data.tar.gz: f3310b1e8bdc7fdb31a829ee39ae01b81e4ea3cae1d3723f311c23e4bf13f10336e83ac35ac399a1dfa41855e7e748079fae5071152fada5841624e7712b0672
|
@@ -7,6 +7,7 @@ module Rhino
|
|
7
7
|
class_option :routes_directory, type: :string, desc: "The directory to copy the routes to",
|
8
8
|
default: "app/frontend/routes", group: :route
|
9
9
|
class_option :route_path, type: :string, desc: "The path to routes relative to the routes directory", default: "_authenticated/$owner", group: :route
|
10
|
+
class_option :model_path, type: :string, desc: "The base path name for the model (defaults to model plural name)", group: :route
|
10
11
|
class_option :copy_index, type: :boolean, desc: "Copy the index route", default: true, group: :route
|
11
12
|
class_option :copy_show, type: :boolean, desc: "Copy the show route", default: true, group: :route
|
12
13
|
class_option :copy_create, type: :boolean, desc: "Copy the create route", default: true, group: :route
|
@@ -35,13 +36,17 @@ module Rhino
|
|
35
36
|
end
|
36
37
|
|
37
38
|
private
|
38
|
-
def
|
39
|
-
|
39
|
+
def model_path
|
40
|
+
options[:model_path] || plural_table_name
|
40
41
|
end
|
41
42
|
|
42
|
-
# Begin and end with a slash
|
43
43
|
def route_path
|
44
|
-
File.join("/", options[:route_path],
|
44
|
+
File.join("/", options[:route_path], model_path, "/")
|
45
|
+
end
|
46
|
+
|
47
|
+
|
48
|
+
def route_file_path(file_name)
|
49
|
+
File.join(options[:routes_directory], options[:route_path], model_path, file_name)
|
45
50
|
end
|
46
51
|
end
|
47
52
|
end
|
data/lib/rhino/version.rb
CHANGED