wrgem 0.0.39 → 0.0.40
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.
- checksums.yaml +4 -4
- data/lib/generators/wradmin/template/lib/assets/stylesheets/atom-style.sass +2 -0
- data/lib/generators/wradmin/template/lib/templates/rails/scaffold_controller/controller.rb +10 -8
- data/lib/generators/wradmin/template/lib/templates/slim/scaffold/_form.html.slim +2 -1
- data/lib/generators/wradmin/template/lib/templates/slim/scaffold/create.js.erb +1 -0
- data/lib/generators/wradmin/template/lib/templates/slim/scaffold/update.js.erb +1 -0
- data/lib/wrgem/version.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: fb2c4cf0141fb62d27423cea3ec7443d7ceeb3ab
|
|
4
|
+
data.tar.gz: dfe63fd62030e69e0636f4788e42d19cbd8fae5b
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9c0dfebec4ff501ef977d2c0b9bd2a3978f1dd9e120df51017fc67390716775487e5c878ea6c5b9c73a0bcbfafc263371a61b3bd852a73ec4f3ec50244d3cb55
|
|
7
|
+
data.tar.gz: ce36a91229ee759b68f56f6207b44380fc782cd9038da8f7b4140067d63e0d9cb806e346c7190ed057e38ead1a1a3ed44c97f941322c02939a8fc438a1dad86b
|
|
@@ -24,19 +24,21 @@ class <%= controller_class_name %>Controller < ApplicationController
|
|
|
24
24
|
def create
|
|
25
25
|
@<%= singular_table_name %> = <%= orm_class.build(class_name, "#{singular_table_name}_params") %>
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
respond_to do |format|
|
|
28
|
+
if @<%= orm_instance.save %>
|
|
29
|
+
format.js
|
|
30
|
+
end
|
|
31
31
|
end
|
|
32
|
+
flash[:notice] = 'Criado com sucesso.'
|
|
32
33
|
end
|
|
33
34
|
|
|
34
35
|
def update
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
respond_to do |format|
|
|
37
|
+
if @<%= orm_instance.update("#{singular_table_name}_params") %>
|
|
38
|
+
format.js
|
|
39
|
+
end
|
|
39
40
|
end
|
|
41
|
+
flash[:notice] = 'Editado com sucesso.'
|
|
40
42
|
end
|
|
41
43
|
|
|
42
44
|
def destroy
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
= simple_form_for(@<%= singular_table_name
|
|
1
|
+
= simple_form_for(@<%= singular_table_name %>, :remote => true) do |f|
|
|
2
2
|
= f.error_notification
|
|
3
3
|
|
|
4
4
|
<%- attributes.each do |attribute| -%>
|
|
5
|
+
|
|
5
6
|
.form-group
|
|
6
7
|
= f.label "<%= attribute.name %>", class: "col-sm-3 control-label"
|
|
7
8
|
.col-sm-9
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
window.location.href = "<%=plural_table_name_url %>";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
window.location.href = "<%=plural_table_name_url %>";
|
data/lib/wrgem/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: wrgem
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.40
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- davidleandro
|
|
@@ -342,10 +342,12 @@ files:
|
|
|
342
342
|
- lib/generators/wradmin/template/lib/assets/stylesheets/style-responsive.css
|
|
343
343
|
- lib/generators/wradmin/template/lib/templates/rails/scaffold_controller/controller.rb
|
|
344
344
|
- lib/generators/wradmin/template/lib/templates/slim/scaffold/_form.html.slim
|
|
345
|
+
- lib/generators/wradmin/template/lib/templates/slim/scaffold/create.js.erb
|
|
345
346
|
- lib/generators/wradmin/template/lib/templates/slim/scaffold/edit.html.slim
|
|
346
347
|
- lib/generators/wradmin/template/lib/templates/slim/scaffold/index.html.slim
|
|
347
348
|
- lib/generators/wradmin/template/lib/templates/slim/scaffold/new.html.slim
|
|
348
349
|
- lib/generators/wradmin/template/lib/templates/slim/scaffold/show.html.slim
|
|
350
|
+
- lib/generators/wradmin/template/lib/templates/slim/scaffold/update.js.erb
|
|
349
351
|
- lib/generators/wradmin/template/locales/pt-br.yml
|
|
350
352
|
- lib/generators/wradmin/template/locales/simple_form.pt-br.yml
|
|
351
353
|
- lib/generators/wradmin/template/migrate/20140711182158_devise_create_users.rb
|