datagrid 2.0.1 → 2.0.3

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: 73b5ec45b488122854f535af2e33440795923c7186f07195b1dd12c830656a83
4
- data.tar.gz: 72b4cf51c6b47d6d3985bad16f0ca775b09b0770172c8ddaa67eb53091f50fb5
3
+ metadata.gz: 6cc15c9ea72791b889df3bb2d63e91ce7a169edc0b59696088814ab0073dec90
4
+ data.tar.gz: d26164cc067285f8458adda642f6533203d9e7874b8581ee9c62a3fd5aeeed83
5
5
  SHA512:
6
- metadata.gz: ebd3afee727b599bc3cfb1bb54aea656fb117edff207bfde118ef9fce36d716344ab7384dd2a801e3efd3d64e19fef419882b2a343a91408ce680755bfaf79bc
7
- data.tar.gz: 3ee4d83c374287526c0f96a821c72d0254b2c1eed9d1cedef619c3bfd2425a2f21065b1571a7f065afebb6efe8c9c71ddf07f5e76678c755f5f5b99a3bfd4e06
6
+ metadata.gz: 316d4add546ac0b9d8b446dda966af1b7facf76fdbfd19cb25d9fa160e6b33c1d241ef7a6278308c28bce66d899b065b7c6e584145d611d000ceba056b9add0d
7
+ data.tar.gz: 2c254dcc6786227571346daf07c2a38896d886bc1ccf15d61b8f9df6dca9080072b0fa9b544157fecd5c7e3bde62d7a1840bf546d691686e5dbd5101877c83f7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.0.3]
4
+
5
+ * Fix `default_column_options` bug [#338](https://github.com/bogdan/datagrid/issues/338) by @pokonski.
6
+ * Fix generator [#336](https://github.com/bogdan/datagrid/issues/336)
7
+
3
8
  ## [2.0.1]
4
9
 
5
10
  * Fixed `search` field type support [#330](https://github.com/bogdan/datagrid/issues/330)
data/README.md CHANGED
@@ -189,7 +189,7 @@ insert app/assets/stylesheet/application.css
189
189
  In order to get a control on datagrid built-in views run:
190
190
 
191
191
  ``` sh
192
- rails g datagrid::views
192
+ rails g datagrid:views
193
193
  ```
194
194
 
195
195
  #### Advanced frontend
@@ -43,16 +43,16 @@ module Datagrid
43
43
  # @return [Class] grid class where column is defined
44
44
  # @attribute [r] name
45
45
  # @return [Symbol] column name
46
- # @attribute [r] options
46
+ # @attribute [r] column_options
47
47
  # @return [Hash<Symbol, Object>] column options
48
48
  attr_reader :grid_class, :name, :query, :options, :data_block, :html_block
49
49
 
50
50
  # @!visibility private
51
- def initialize(grid_class, name, query, options = {}, &block)
51
+ def initialize(grid_class, name, query, column_options = {}, &block)
52
52
  @grid_class = grid_class
53
53
  @name = name.to_sym
54
54
  @query = query
55
- @options = Datagrid::Utils.callable(grid_class.default_column_options, self).merge(options)
55
+ @options = Datagrid::Utils.callable(grid_class.default_column_options, self).merge(column_options)
56
56
 
57
57
  if options[:class]
58
58
  Datagrid::Utils.warn_once(
@@ -10,7 +10,7 @@ module Datagrid
10
10
  include Rails::Generators::ResourceHelpers
11
11
 
12
12
  check_class_collision suffix: "Grid"
13
- source_root File.expand_path("#{__FILE__}/../../../templates")
13
+ source_root File.expand_path("#{__dir__}/../../../templates")
14
14
 
15
15
  def create_scaffold
16
16
  template "base.rb.erb", base_grid_file unless file_exists?(base_grid_file)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Datagrid
4
- VERSION = "2.0.1"
4
+ VERSION = "2.0.3"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datagrid
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bogdan Gusiev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-01-27 00:00:00.000000000 Z
11
+ date: 2025-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties