datagrid 1.8.0 → 1.8.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
  SHA256:
3
- metadata.gz: 6b7756de5445c9c99d265a897b609b9f3dcf6dbf0b03e32455ca96518bf01eea
4
- data.tar.gz: 7f748c1a7075331672e749d582145deacc1d38977ada1770b6d7b548d9bb17c9
3
+ metadata.gz: df8447e3bdc797a74cbbc4d7aac869bac6c0bcd57500d58bf14c1f3af5db7df9
4
+ data.tar.gz: aa0c1a716ad3a7054db53f7605222d1386b73a8378c0eaf3087fd60477361bd3
5
5
  SHA512:
6
- metadata.gz: 8acee3003f7a9e63ec80808221667fa530f74d882c88d06ce20855b97bf75ec806a6eb5ddf89c9f47044d943238d74c33fcfd290c78d8d4e6e31a3081f4f6e83
7
- data.tar.gz: 54d4cb553c0a82068d905e8367bffb18298d215b3a0ae09be4b09fa2f77dfe1cc299e019c080d3b689d897f2f38dba217bdef5200284bebadc8ccb1b9ce83644
6
+ metadata.gz: 9bffeed51b8a4d994136931096f5c7438243ad73c2c46540c7f20a2a542e25c6644b970ddc1e2fc10673de94b1d1f6a0d1892caf7cdc4fec38bde67324767508
7
+ data.tar.gz: d3ccf6646f9b8c21f0b8c2a81853294c9e8069c5a17644617c57d1de675be8bb380237aafb9f5b12e21ac49c909376bbf53d0d4e30e50a96387c070c8919fc59
data/CHANGELOG.md CHANGED
@@ -1,20 +1,38 @@
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
+
13
+ ## 1.8.1
14
+
15
+ * Prioritize `input_options` over generated by default. [#319](https://github.com/bogdan/datagrid/pull/319)
16
+
3
17
  ## 1.8.0
4
18
 
5
19
  * Support `input_options: {type: "textarea"}` as `<textarea/>` tag
6
20
  * Remove deprecated `eboolean` filter
7
21
  * Fixed scope wrapping to be universal
8
- * Deprecated `integer_range_filters` and `date_range_filters`. Use `filter(name, type, range: true)` instead.
9
- * Add `original_scope` method that returns scope as it was defined without any wrapping [#313](https://github.com/bogdan/datagrid/pull/313)
10
- * 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)
11
29
 
12
30
  ## 1.7.0
13
31
 
14
32
  * Depend on `railties` instead of `rails` to prevent loading of unnecessary frameworks
15
- * Bugfix `File.exist?` usage for ruby 3.0 [#307](https://github.com/bogdan/datagrid/issues/307)
16
- * Drop support of old Ruby versions (< 2.7)
17
- * 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)
18
36
 
19
37
  ## 1.6.3
20
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?