egov_utils 0.4.7 → 0.4.9

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: ebfe2b7a245184c67084c7ccd0b3080545f2e6152f94b7539e039e50ee85dd25
4
- data.tar.gz: 54630c77b3547fbf6436c9579ae752cd0f2d1314e19fe60cc84180ca7981a61c
3
+ metadata.gz: 36e83b4cc0d2d3c4cca271573fe52c05be094841c2752355fd419d3ad5ede82c
4
+ data.tar.gz: 13ec9e2830a06f4863bfd58890258ebccf7266e37783af5e094de4089a4e7806
5
5
  SHA512:
6
- metadata.gz: 05203634b32d05bd37df95b1e6cf680ed694055becaa7f08bf1a1bb2050c9cf464c786e0f2436f75897e4a672a75a13554d0051f3bf161ae0e7b23bf03d40252
7
- data.tar.gz: 82d436cfe8150bc95e9036b859b7b39f78ea1ed238a07e01b9b35b930b5d87e13d8873e49ac81faf4816ac904e146f6244ef9ae0c36e5f50882226a6c532f39b
6
+ metadata.gz: bcd3259094c96b7dbfea0cda362bbaf570a96ca8315c4f7c92e0f376018435f4b5193b23348f30805acf48f808291b008de11cd78105e9db1903e48397d4f824
7
+ data.tar.gz: 437c12e05d1839a2e6e980b5ef062c7e753620fff6f11807d7d4bb75c6e0aaf898424c491739a8ac7fb3ad1e5dacffdeb64ec51a6759c165caeaae619edcc502
@@ -65,6 +65,12 @@ module EgovUtils
65
65
  s << "}"
66
66
  end
67
67
 
68
+ def grid_necessary_fields(schema)
69
+ fields = schema.columns.dup
70
+ pks = [schema.model.primary_key].concat(fields.collect{|col| col.primary_key_name }).uniq
71
+ fields.concat(pks.map{|pk_name| schema.attribute(pk_name) })
72
+ end
73
+
68
74
  def additional_grid_edit_buttons(schema)
69
75
  end
70
76
  end
@@ -43,7 +43,7 @@ $ ->
43
43
  data: 'entities'
44
44
  total: 'count'
45
45
  fields:
46
- <% schema.available_columns.each do |column| %>
46
+ <% grid_necessary_fields(schema).each do |column| %>
47
47
  <%= raw field_for_grid(column) %>
48
48
  <% end %>
49
49
  events:
data/lib/egov_utils.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'sassc-rails'
2
+
1
3
  require 'jquery-rails'
2
4
  require 'jquery-ui-rails'
3
5
  require 'font-awesome-sass'
@@ -1,3 +1,3 @@
1
1
  module EgovUtils
2
- VERSION = '0.4.7'
2
+ VERSION = '0.4.9'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: egov_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.7
4
+ version: 0.4.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ondřej Ezr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-03 00:00:00.000000000 Z
11
+ date: 2018-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -254,14 +254,14 @@ dependencies:
254
254
  requirements:
255
255
  - - "~>"
256
256
  - !ruby/object:Gem::Version
257
- version: '5.0'
257
+ version: '5.2'
258
258
  type: :runtime
259
259
  prerelease: false
260
260
  version_requirements: !ruby/object:Gem::Requirement
261
261
  requirements:
262
262
  - - "~>"
263
263
  - !ruby/object:Gem::Version
264
- version: '5.0'
264
+ version: '5.2'
265
265
  - !ruby/object:Gem::Dependency
266
266
  name: bootstrap_form
267
267
  requirement: !ruby/object:Gem::Requirement