zutils 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/shared/_form.html.erb +3 -3
- data/lib/zutils/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 470a5dc3dbae6d8f2a29ed79358146d9c308ee20803b0d175ebf8565e4e8b5d7
|
4
|
+
data.tar.gz: f51a15db31ca14343b65317c47856fb4e1a2b641550711eb639ec18761c6253b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e77f3b10976238ded762d40289bc841a8914573a62c24318112d5fa63108a790b08aa96093dc6c697b337e486ee93c2400a0862edc713835487c33e52ca4a4f
|
7
|
+
data.tar.gz: 12be1571ae9c6f4aee0b48266571bba77700624ad9ef4f722da7f929f63fa8c22bb3b80dac9ed26f260645b9a6eaf46b38c48d703d665cbfc070d6e533bfe60b
|
@@ -5,8 +5,8 @@
|
|
5
5
|
<% back_link ||= false %>
|
6
6
|
<% box_class ||= 'primary' %>
|
7
7
|
|
8
|
-
<%
|
9
|
-
<% form_ordered_fields ||= (
|
8
|
+
<% form_fields ||= (object.class.respond_to?('form_fields') ? object.class.form_fields : {}) %>
|
9
|
+
<% form_ordered_fields ||= (form_fields.nil? ? object.class.column_names : form_fields.keys) %>
|
10
10
|
|
11
11
|
<%= simple_form_for(nested_resource ? [parent_resource, object] : object) do |f| %>
|
12
12
|
<div class="box box-<%= box_class %>">
|
@@ -24,7 +24,7 @@
|
|
24
24
|
<div class="box-body">
|
25
25
|
<div class="row">
|
26
26
|
<% (form_ordered_fields - ['id', 'created_at', 'updated_at', 'deleted_at'] - excluded_columns).each do |column| %>
|
27
|
-
<% wphtml = "col-md-#{
|
27
|
+
<% wphtml = "col-md-#{form_fields[column.to_sym] || 12}" %>
|
28
28
|
<% if object.class.column_for_attribute(column).type == :text %>
|
29
29
|
<%= f.input column, input_html: { rows: 10, cols: 20 }, wrapper_html: { class: wphtml } %>
|
30
30
|
<% elsif [:date, :datetime].include?(object.class.column_for_attribute(column).type) %>
|
data/lib/zutils/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zutils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ricardo Viana
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-11-
|
11
|
+
date: 2018-11-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|