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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 40a56e918628bfd94234246f5d159391470db0b9918988669982423a93a9beff
4
- data.tar.gz: '06728ebd8077a390326ce13fce2803875ada4bd89b5cfae2c4a47e2f0af7e098'
3
+ metadata.gz: 470a5dc3dbae6d8f2a29ed79358146d9c308ee20803b0d175ebf8565e4e8b5d7
4
+ data.tar.gz: f51a15db31ca14343b65317c47856fb4e1a2b641550711eb639ec18761c6253b
5
5
  SHA512:
6
- metadata.gz: 13af2afa9f2ade899dcb9c9f8eb2d6d05658b97bbfd392415a68d07981484fc6371da87022b9bc6267c8a843b89db7c5f2f4fcb210d08ec2076642cac9c77b4e
7
- data.tar.gz: 703cd4152301f18998c8704f2add00d4c97dce896e1058e7784371943102f41546a1792fd7dfa3f0cbb4330b661323422b80f518691a9c3eacf64bb257f608c1
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
- <% form_size_fields ||= (object.class.respond_to?('form_size_fields') ? object.class.form_size_fields : {}) %>
9
- <% form_ordered_fields ||= (object.class.respond_to?('form_ordered_fields') ? object.class.form_ordered_fields : object.class.column_names) %>
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-#{form_size_fields[column.to_sym] || 12}" %>
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) %>
@@ -1,3 +1,3 @@
1
1
  module Zutils
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  end
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.5
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-22 00:00:00.000000000 Z
11
+ date: 2018-11-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails