scaf-generator 0.1.2 → 0.1.3
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.
data/CHANGELOG
CHANGED
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
## v0.0.1
|
|
2
1
|
|
|
3
|
-
|
|
2
|
+
## v0.1.3
|
|
3
|
+
* BugFixing
|
|
4
|
+
|
|
5
|
+
## v0.0.3
|
|
6
|
+
|
|
7
|
+
* Controller ahora usa nombre Plural
|
|
4
8
|
|
|
5
9
|
## v0.0.2
|
|
6
10
|
|
|
7
11
|
* No Assets (Javascripts y Stylesheets)
|
|
8
12
|
|
|
9
|
-
## v0.0.3
|
|
10
13
|
|
|
11
|
-
|
|
14
|
+
## v0.0.1
|
|
15
|
+
|
|
16
|
+
* Release Inicial
|
|
@@ -19,9 +19,8 @@ class ScafGenerator < Rails::Generators::Base
|
|
|
19
19
|
# Genera un Scaffold sin Controller ni Vistas ni Assets
|
|
20
20
|
generate("scaffold", "#{scaffold_name} #{arguments.join(' ')} --no-scaffold-controller --no-assets")
|
|
21
21
|
|
|
22
|
-
#
|
|
23
|
-
|
|
24
|
-
inject_into_file "app/models/#{scaffold_name}.rb", "def eliminar!\n update_attributes :es_activo => false\n end", :after => /class \w*$/
|
|
22
|
+
# Agrega Metodo Eliminar! al Modelo
|
|
23
|
+
inject_into_file 'app/models/#{singular_name}.rb', " def eliminar!\n update_attributes :es_activo => false\n end" , :after => /ActiveRecord::Base$/
|
|
25
24
|
|
|
26
25
|
# Agrega controller de administracion en controllers/admin/
|
|
27
26
|
template 'admin_controller.rb', "app/controllers/admin/#{plural_name}_controller.rb"
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
class Admin::<%= plural_class_name %>Controller < Admin::AdminController
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
load_and_authorize_resource
|
|
4
4
|
|
|
5
5
|
def index
|
|
6
6
|
@<%= item %> = <%= class_name %>.new
|
|
7
|
-
@<%= items %> = <%= class_name %>.page params[:page]
|
|
8
7
|
end
|
|
9
8
|
|
|
10
9
|
def new; end
|
|
@@ -36,10 +35,6 @@ class Admin::<%= plural_class_name %>Controller < Admin::AdminController
|
|
|
36
35
|
|
|
37
36
|
private
|
|
38
37
|
|
|
39
|
-
# def sort_coleccion
|
|
40
|
-
# <%= class_name %>.scoped
|
|
41
|
-
# end
|
|
42
|
-
|
|
43
38
|
def translate_notice
|
|
44
39
|
t("notice.#{action_name}", :elemento => @<%= item %>)
|
|
45
40
|
end
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: scaf-generator
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.3
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-02-
|
|
12
|
+
date: 2012-02-27 00:00:00.000000000 Z
|
|
13
13
|
dependencies: []
|
|
14
14
|
description: Scaffold adaptado a las necesidades de Xaver
|
|
15
15
|
email:
|
|
@@ -36,6 +36,7 @@ files:
|
|
|
36
36
|
- pkg/scaf-generator-0.0.2.gem
|
|
37
37
|
- pkg/scaf-generator-0.1.0.gem
|
|
38
38
|
- pkg/scaf-generator-0.1.1.gem
|
|
39
|
+
- pkg/scaf-generator-0.1.2.gem
|
|
39
40
|
- scaf-generator.gemspec
|
|
40
41
|
homepage: http://github.com/nicanorperera/scaf-generator
|
|
41
42
|
licenses: []
|