myg 2.5.0 → 2.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/generators/myg/tabs_generator.rb +23 -23
- data/lib/myg/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: 3ca73fcff3750115f8e0a91a412ca039bcf56479830b94b608754eecd312442e
|
4
|
+
data.tar.gz: 1998f66cb94746ed96d78eb600c1b72b184c435050da5756c34803bdeee2706b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6c7f1374651a94c0cc47955285fe888a01b0746f13200c0c406e0f8959ef76011e3182818aae44df446bb2569aa12bf636a8a62e86f8480fac5ef233ead5269
|
7
|
+
data.tar.gz: 284f42dd770dc570c73e0643575373305c28cef8cfd46661f5099485f70ed39e3b6531a355e10f58078275cd5f36d208f40042e071c26590fa308e4f90df2c6f
|
data/CHANGELOG.md
CHANGED
@@ -1,23 +1,23 @@
|
|
1
|
-
require 'rails/generators'
|
2
|
-
require 'rails/generators/migration'
|
3
|
-
|
4
|
-
class Myg::TabsGenerator < Rails::Generators::Base
|
5
|
-
|
6
|
-
include Rails::Generators::Migration
|
7
|
-
|
8
|
-
source_root File.join File.dirname(__FILE__), '../templates/tabs'
|
9
|
-
desc 'Generate a Myg tabs template'
|
10
|
-
|
11
|
-
class_option :controller, desc: 'Tabs controller', type: :string, aliases: '-c'
|
12
|
-
class_option :method_names, desc: 'Tab method names', type: :array, aliases: '-m'
|
13
|
-
|
14
|
-
def create_templates
|
15
|
-
template '_tabs.html.erb', "app/views/#{options[:controller]}/_tabs.html.erb"
|
16
|
-
options[:method_names]&.each do |name|
|
17
|
-
@name = name
|
18
|
-
template 'tab.html.erb', "app/views/#{options[:controller]}/_#{name}.html.erb"
|
19
|
-
template '_tab.html.erb', "app/views/#{options[:controller]}/#{name}.html.erb"
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
end
|
1
|
+
require 'rails/generators'
|
2
|
+
require 'rails/generators/migration'
|
3
|
+
|
4
|
+
class Myg::TabsGenerator < Rails::Generators::Base
|
5
|
+
|
6
|
+
include Rails::Generators::Migration
|
7
|
+
|
8
|
+
source_root File.join File.dirname(__FILE__), '../templates/tabs'
|
9
|
+
desc 'Generate a Myg tabs template'
|
10
|
+
|
11
|
+
class_option :controller, desc: 'Tabs controller', type: :string, aliases: '-c'
|
12
|
+
class_option :method_names, desc: 'Tab method names', type: :array, aliases: '-m'
|
13
|
+
|
14
|
+
def create_templates
|
15
|
+
template '_tabs.html.erb', "app/views/#{options[:controller]}/_tabs.html.erb"
|
16
|
+
options[:method_names]&.each do |name|
|
17
|
+
@name = name[:id]
|
18
|
+
template 'tab.html.erb', "app/views/#{options[:controller]}/_#{@name}.html.erb"
|
19
|
+
template '_tab.html.erb', "app/views/#{options[:controller]}/#{@name}.html.erb"
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
data/lib/myg/version.rb
CHANGED