active_generator 2.0.2 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_generator.rb +31 -0
- data/lib/active_generator/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a084351f7e81d50d9fb1a105a2789873e5a46e0
|
4
|
+
data.tar.gz: ca51d5992b824f1ac87e5d6ee9c3d89ec81343cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2368466c8db18148d54110577ad92d3dbd8a55f45ce8a5357f929e19025c5d4b8f908602a99cbd1c5f4d496794354fa750ffbf8cd0c417692d8e8cc1ca263bec
|
7
|
+
data.tar.gz: ce829e61b6f9c41ab563746fd3daad06905d6fe6925550835c67a2f078db442819e8d54ff20312dc635c940ec334c23397c4cb73a79f60ded3b33cc2d887401a
|
data/lib/active_generator.rb
CHANGED
@@ -8,4 +8,35 @@ require "generators/service/service_generator"
|
|
8
8
|
|
9
9
|
%w(api controller helper job mailer model service uploader view).each do |name|
|
10
10
|
require "generators/locale/#{name}/#{name}_generator"
|
11
|
+
end
|
12
|
+
|
13
|
+
Rails::Generators::ControllerGenerator.class_eval do
|
14
|
+
def copy_locale_file
|
15
|
+
invoke("locale:controller", [name])
|
16
|
+
invoke("locale:helper", [name])
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
Rails::Generators::HelperGenerator.class_eval do
|
21
|
+
def copy_locale_file
|
22
|
+
invoke("locale:helper", [name])
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
Rails::Generators::JobGenerator.class_eval do
|
27
|
+
def copy_locale_file
|
28
|
+
invoke("locale:job", [name])
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
Rails::Generators::MailerGenerator.class_eval do
|
33
|
+
def copy_locale_file
|
34
|
+
invoke("locale:mailer", [name])
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
Rails::Generators::MailerGenerator.class_eval do
|
39
|
+
def copy_locale_file
|
40
|
+
invoke("locale:model", [name])
|
41
|
+
end
|
11
42
|
end
|