scaffold_cn 0.1.3 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/scaffold_cn/scaffold_cn_generator.rb +6 -7
- data/lib/generators/scaffold_cn/templates/config/locales/{defaults/zh_CN.yml → defaults.zh_CN.yml} +0 -0
- data/lib/generators/scaffold_cn/templates/config/locales/{devise/zh_CN.yml → devise.zh_CN.yml} +0 -0
- data/lib/generators/scaffold_cn/templates/config/locales/{models/zh_CN.yml → models.zh_CN.yml} +0 -0
- data/lib/generators/scaffold_cn/templates/config/locales/{views/zh_CN.yml → views.zh_CN.yml} +0 -0
- data/lib/generators/scaffold_cn/templates/lib/templates/erb/scaffold/edit.html.erb +1 -1
- data/lib/generators/scaffold_cn/templates/lib/templates/erb/scaffold/index.html.erb +2 -2
- data/lib/generators/scaffold_cn/templates/lib/templates/erb/scaffold/new.html.erb +1 -1
- data/lib/scaffold_cn/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 443fc531d199a2a09930b7c24254b74ea4263774
|
4
|
+
data.tar.gz: 8d8ad108cb358cb0909102784a5fd56715ccfbd2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35ba3b4dc71e43b941324f2ade601e106b63958dbe30eab1f6c81e61cee6e8c76c19f9bb35554e7e9d1c09f695df901b2c1db32df8dafa7e12b1ce973eac96c8
|
7
|
+
data.tar.gz: 009ddca39ed4894319b8e7c74e9090e0e73af3f95881501ff7afd21729e31dffe6f47c9fcd119fbbcf106aba9748b84c7197ec56d7913ae137a78b4b3183a2df
|
@@ -2,20 +2,19 @@
|
|
2
2
|
class Scaffold_cnGenerator < Rails::Generators::Base
|
3
3
|
source_root File.expand_path('../templates', __FILE__)
|
4
4
|
|
5
|
-
def generate_scaffold_cn
|
6
|
-
puts "type: #{type}"
|
5
|
+
def generate_scaffold_cn
|
7
6
|
templates = [
|
8
7
|
'lib/templates/erb/scaffold/_form.html.erb',
|
9
8
|
'lib/templates/erb/scaffold/edit.html.erb',
|
10
9
|
'lib/templates/erb/scaffold/index.html.erb',
|
11
10
|
'lib/templates/erb/scaffold/new.html.erb',
|
12
11
|
'lib/templates/erb/scaffold/show.html.erb',
|
13
|
-
'config/locales/defaults
|
14
|
-
'config/locales/models
|
15
|
-
'config/locales/views
|
16
|
-
'config/locales/devise
|
12
|
+
'config/locales/defaults.zh_CN.yml',
|
13
|
+
'config/locales/models.zh_CN.yml',
|
14
|
+
'config/locales/views.zh_CN.yml',
|
15
|
+
'config/locales/devise.zh_CN.yml']
|
17
16
|
templates.each do |path|
|
18
|
-
|
17
|
+
copy_file path, path
|
19
18
|
end
|
20
19
|
end
|
21
20
|
end
|
data/lib/generators/scaffold_cn/templates/config/locales/{defaults/zh_CN.yml → defaults.zh_CN.yml}
RENAMED
File without changes
|
data/lib/generators/scaffold_cn/templates/config/locales/{devise/zh_CN.yml → devise.zh_CN.yml}
RENAMED
File without changes
|
data/lib/generators/scaffold_cn/templates/config/locales/{models/zh_CN.yml → models.zh_CN.yml}
RENAMED
File without changes
|
data/lib/generators/scaffold_cn/templates/config/locales/{views/zh_CN.yml → views.zh_CN.yml}
RENAMED
File without changes
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<h1><%%= <%= human_name %>.model_name.human
|
1
|
+
<h1><%%= <%= human_name %>.model_name.human %><%%= t :index %></h1>
|
2
2
|
|
3
3
|
<table>
|
4
4
|
<thead>
|
@@ -26,4 +26,4 @@
|
|
26
26
|
|
27
27
|
<br>
|
28
28
|
|
29
|
-
<%%= link_to (
|
29
|
+
<%%= link_to (t(:new) + <%= human_name %>.model_name.human), new_<%= singular_table_name %>_path %>
|
data/lib/scaffold_cn/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scaffold_cn
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- homeway
|
@@ -32,10 +32,10 @@ extensions: []
|
|
32
32
|
extra_rdoc_files: []
|
33
33
|
files:
|
34
34
|
- lib/generators/scaffold_cn/scaffold_cn_generator.rb
|
35
|
-
- lib/generators/scaffold_cn/templates/config/locales/defaults
|
36
|
-
- lib/generators/scaffold_cn/templates/config/locales/devise
|
37
|
-
- lib/generators/scaffold_cn/templates/config/locales/models
|
38
|
-
- lib/generators/scaffold_cn/templates/config/locales/views
|
35
|
+
- lib/generators/scaffold_cn/templates/config/locales/defaults.zh_CN.yml
|
36
|
+
- lib/generators/scaffold_cn/templates/config/locales/devise.zh_CN.yml
|
37
|
+
- lib/generators/scaffold_cn/templates/config/locales/models.zh_CN.yml
|
38
|
+
- lib/generators/scaffold_cn/templates/config/locales/views.zh_CN.yml
|
39
39
|
- lib/generators/scaffold_cn/templates/lib/templates/erb/scaffold/_form.html.erb
|
40
40
|
- lib/generators/scaffold_cn/templates/lib/templates/erb/scaffold/edit.html.erb
|
41
41
|
- lib/generators/scaffold_cn/templates/lib/templates/erb/scaffold/index.html.erb
|