raro_generator 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0d905034412e3672cf2083cd3e74abe01352fc9d
|
4
|
+
data.tar.gz: af519cd1974fefa78e164a880596e9221b7aa8f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80b6fdf9ddcd5b93e9c29ec09e3409f4e13fd2c841338fe74e0aa84ae21c026c376a12b462981a97a01bfb911f6fd3d36a6016a9262a48aca59153bfdabe65ea
|
7
|
+
data.tar.gz: 447262e29cb5460edddf91c6a039b316e33448087c7aff46f1daf7221aa199e54e93637d5dd12c43299eadb58caf3c30c758ab8952c126711ef6d97a70d2e376
|
@@ -0,0 +1,25 @@
|
|
1
|
+
class <%=@model.name%>Crud < RaroCrud
|
2
|
+
|
3
|
+
titulo "<%=@model.name.pluralize%>"
|
4
|
+
|
5
|
+
link_superior "Novo <%=@model.name%>", id: "novo-button", icon: "plus", link: "new", can: Proc.new { Usuario.current.ability.can?(:create, <%=@model.name%>)}
|
6
|
+
|
7
|
+
ordenar_por :created_at
|
8
|
+
itens_por_pagina 20
|
9
|
+
|
10
|
+
<%
|
11
|
+
@atributos = @model.attribute_names
|
12
|
+
@atributos.delete("id")
|
13
|
+
@atributos.delete("created_at")
|
14
|
+
@atributos.delete("updated_at")
|
15
|
+
@atributos.map!{|e| e.gsub(/_id/,"")}
|
16
|
+
%>
|
17
|
+
|
18
|
+
<%@atributos.each do |atributo| %>campo_tabela :<%=atributo.to_sym%>, label: "<%=atributo.humanize%>"<%="\n"%> <%end%>
|
19
|
+
|
20
|
+
<%@atributos.each do |atributo| %>campo_formulario :<%=atributo.to_sym%>, label: "<%=atributo.humanize%>"<%="\n"%> <%end%>
|
21
|
+
|
22
|
+
<%@atributos.each do |atributo| %>campo_visualizacao :<%=atributo.to_sym%>, label: "<%=atributo.humanize%>"<%="\n"%> <%end%>
|
23
|
+
|
24
|
+
<%@atributos.each do |atributo| %>campo_busca :<%=atributo.to_sym%>, label: "<%=atributo.humanize%>"<%="\n"%> <%end%>
|
25
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raro_generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leonardo Herbert
|
@@ -564,6 +564,9 @@ files:
|
|
564
564
|
- lib/generators/assets/autocomplete/autocomplete_generator.rb
|
565
565
|
- lib/generators/assets/precompile_local/USAGE
|
566
566
|
- lib/generators/assets/precompile_local/precompile_local_generator.rb
|
567
|
+
- lib/generators/crud/USAGE
|
568
|
+
- lib/generators/crud/crud_generator.rb
|
569
|
+
- lib/generators/crud/templates/crud.rb
|
567
570
|
- lib/generators/deploy/homologacao/USAGE
|
568
571
|
- lib/generators/deploy/homologacao/homologacao_generator.rb
|
569
572
|
- lib/generators/deploy/homologacao/templates/deploy.rb
|