scaffoldhub 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/generators/erb/scaffoldhub_generator.rb +11 -4
- data/lib/scaffoldhub.rb +1 -1
- metadata +4 -4
@@ -10,15 +10,22 @@ module Erb
|
|
10
10
|
|
11
11
|
def copy_view_files
|
12
12
|
each_template_file(:erb) do |erb_template_file|
|
13
|
-
|
13
|
+
if is_layout_erb?(erb_template_file)
|
14
|
+
copy_layout_file(erb_template_file)
|
15
|
+
else
|
14
16
|
template erb_template_file.src, File.join("app/views", controller_file_path, erb_template_file.dest)
|
15
17
|
end
|
16
18
|
end
|
17
19
|
end
|
18
20
|
|
19
|
-
|
20
|
-
|
21
|
-
|
21
|
+
private
|
22
|
+
|
23
|
+
def copy_layout_file(layout_template)
|
24
|
+
template layout_template.src, File.join('app/views/layouts', "#{controller_file_name}.html.erb")
|
25
|
+
end
|
26
|
+
|
27
|
+
def is_layout_erb?(template_file)
|
28
|
+
template_file.dest == 'app/views/layouts/layout.erb'
|
22
29
|
end
|
23
30
|
end
|
24
31
|
end
|
data/lib/scaffoldhub.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scaffoldhub
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Pat Shaughnessy
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-03-
|
18
|
+
date: 2011-03-12 23:00:00 -05:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|