datagrid 1.8.1 → 1.8.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 701bbc42a7501aa45a10d3899b92c9d1f745dae75b0a7eb219db1c339c182cb8
4
- data.tar.gz: cb309f1b9f08b3c1455c1b8650cf222867ba68721a9eb344b310bc5d7d5712e4
3
+ metadata.gz: df8447e3bdc797a74cbbc4d7aac869bac6c0bcd57500d58bf14c1f3af5db7df9
4
+ data.tar.gz: aa0c1a716ad3a7054db53f7605222d1386b73a8378c0eaf3087fd60477361bd3
5
5
  SHA512:
6
- metadata.gz: 6bac4684420163514873a8a31bd06d182d216c8fff27f61d57368d605165838021a33d8603596ee04aee02e2b97a130308553bf36a8b6db0717f363b4c5ad472
7
- data.tar.gz: 4f6190ffaadbf77d0bc39ca632de5df1bcd2ef716bff40a5074b48f710d8b2257e0a95759fe8465a756819deb5e9202abb92a64783eae2bd3804d6c5ddf02e8a
6
+ metadata.gz: 9bffeed51b8a4d994136931096f5c7438243ad73c2c46540c7f20a2a542e25c6644b970ddc1e2fc10673de94b1d1f6a0d1892caf7cdc4fec38bde67324767508
7
+ data.tar.gz: d3ccf6646f9b8c21f0b8c2a81853294c9e8069c5a17644617c57d1de675be8bb380237aafb9f5b12e21ac49c909376bbf53d0d4e30e50a96387c070c8919fc59
data/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
+ # Changelog
2
+
1
3
  ## master
2
4
 
5
+ ## 1.8.2
6
+
7
+ * Treat true/false as YES/NO when assigned as strings for xboolean filter.
8
+ * Support infinite ranges for date, datetime and integer filters.
9
+ * Treat `ActiveRecord::Result` class as `Array` driver.
10
+ * Add `Datagrid#reset` method to reset a column cache.
11
+ * Drop support of Rails 6.0 [#326](https://github.com/bogdan/datagrid/pull/326)
12
+
3
13
  ## 1.8.1
4
14
 
5
15
  * Prioritize `input_options` over generated by default. [#319](https://github.com/bogdan/datagrid/pull/319)
@@ -9,16 +19,20 @@
9
19
  * Support `input_options: {type: "textarea"}` as `<textarea/>` tag
10
20
  * Remove deprecated `eboolean` filter
11
21
  * Fixed scope wrapping to be universal
12
- * Deprecated `integer_range_filters` and `date_range_filters`. Use `filter(name, type, range: true)` instead.
13
- * Add `original_scope` method that returns scope as it was defined without any wrapping [#313](https://github.com/bogdan/datagrid/pull/313)
14
- * Add ability to specify `columns` option for `datagrid_row`. [#314](https://github.com/bogdan/datagrid/pull/314)
22
+ * Deprecated `integer_range_filters` and `date_range_filters`.
23
+ Use `filter(name, type, range: true)` instead.
24
+ * Add `original_scope` method that returns scope
25
+ as it was defined without any wrapping
26
+ [#313](https://github.com/bogdan/datagrid/pull/313)
27
+ * Add ability to specify `columns` option for `datagrid_row`.
28
+ [#314](https://github.com/bogdan/datagrid/pull/314)
15
29
 
16
30
  ## 1.7.0
17
31
 
18
32
  * Depend on `railties` instead of `rails` to prevent loading of unnecessary frameworks
19
- * Bugfix `File.exist?` usage for ruby 3.0 [#307](https://github.com/bogdan/datagrid/issues/307)
20
- * Drop support of old Ruby versions (< 2.7)
21
- * Drop support of old Rails versions (< 6.0)
33
+ * Bugfix `File.exist?` usage for Ruby 3.0 [#307](https://github.com/bogdan/datagrid/issues/307)
34
+ * Drop support of old Ruby versions (< 2.7) [#305](https://github.com/bogdan/datagrid/pull/305)
35
+ * Drop support of old Rails versions (< 6.0) [#305](https://github.com/bogdan/datagrid/pull/305)
22
36
 
23
37
  ## 1.6.3
24
38
 
data/Readme.markdown CHANGED
@@ -22,7 +22,6 @@ A really mighty and flexible ruby library that generates reports including admin
22
22
 
23
23
  [Create an issue](https://github.com/bogdan/datagrid/issues/new) if you want more.
24
24
 
25
-
26
25
  ### Documentation
27
26
 
28
27
  * [Readme](/Readme.markdown) - this read-me for basic information
@@ -101,7 +100,6 @@ In order to create a report, you need to define:
101
100
  * filters that will be used to filter data
102
101
  * columns that should be displayed and sortable (if possible)
103
102
 
104
-
105
103
  ### Scope
106
104
 
107
105
  Default scope of objects to filter and display.
@@ -139,7 +137,6 @@ Datagrid supports different type of filters including:
139
137
 
140
138
  [More about filters](https://github.com/bogdan/datagrid/wiki/Filters)
141
139
 
142
-
143
140
  ### Columns
144
141
 
145
142
  Each column is represented by name and code block to calculate the value.
@@ -193,6 +190,10 @@ All advanced frontend things are described in:
193
190
 
194
191
  If you have a question of any kind, just make an issue and describe your problem in details.
195
192
 
193
+ ## Contribution
194
+
195
+ If you are interested in contributing to this project, please follow the [instructions here](CONTRIBUTING.md).
196
+
196
197
  ## Self-Promotion
197
198
 
198
199
  Like datagrid?
@@ -201,6 +202,5 @@ Follow the repository on [GitHub](https://github.com/bogdan/datagrid).
201
202
 
202
203
  Read [author blog](http://gusiev.com).
203
204
 
204
-
205
205
  ## License
206
206
  [![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fbogdan%2Fdatagrid.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fbogdan%2Fdatagrid?ref=badge_large)
@@ -105,7 +105,7 @@ table.datagrid
105
105
 
106
106
 
107
107
  .datagrid-actions
108
- padding-left: $dg-form-label +10
108
+ padding-left: $dg-form-label + 10
109
109
 
110
110
  input[type='submit']
111
111
  background-color: #555
@@ -7,7 +7,6 @@
7
7
  <% end %>
8
8
  <div class="datagrid-actions">
9
9
  <%= f.submit I18n.t("datagrid.form.search").html_safe, class: "datagrid-submit" %>
10
- <%# https://github.com/rails/rails/pull/14949 -%>
11
10
  <%= link_to I18n.t('datagrid.form.reset').html_safe, url_for(grid.to_param => {}), class: "datagrid-reset" %>
12
11
  </div>
13
12
  <% end -%>
data/datagrid.gemspec CHANGED
@@ -7,8 +7,8 @@ Gem::Specification.new do |s|
7
7
  s.version = Datagrid::VERSION
8
8
  s.require_paths = ["lib"]
9
9
  s.authors = ["Bogdan Gusiev"]
10
- s.summary = "Ruby gem to create datagrids"
11
- s.description = "This allows you to easily build datagrid aka data tables with sortable columns and filters"
10
+ s.summary = "Library that provides DSL to present table like data"
11
+ s.description = "The library allows you to easily build datagrid aka data tables with sortable columns and filters"
12
12
  s.email = "agresso@gmail.com"
13
13
  s.extra_rdoc_files = [
14
14
  "LICENSE.txt",
@@ -32,6 +32,6 @@ Gem::Specification.new do |s|
32
32
  "source_code_uri" => s.homepage,
33
33
  }
34
34
 
35
- s.add_dependency "railties", ">= 6.0"
35
+ s.add_dependency "railties", ">= 6.1"
36
36
  end
37
37
 
@@ -63,7 +63,9 @@ module Datagrid
63
63
  def selected_column_names(*args)
64
64
  if args.any?
65
65
  args.compact!
66
- args.map!(&:to_sym)
66
+ args.map! do |column|
67
+ column.is_a?(Datagrid::Columns::Column) ? column.name : column.to_sym
68
+ end
67
69
  args
68
70
  else
69
71
  if column_names && column_names.any?