ransack_ui 2.0.0 → 2.0.1

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: c76bc56f01efed6de571cb9a79a094095af122c6a35f46abb9bf6567de74b275
4
- data.tar.gz: 26367f813d7dd0851ede9a027aea951ff307fd9e2f7d1380abe72eb5afc762f0
3
+ metadata.gz: 8deb950ea35c48cff735008ab880efef0c23dc8106295467565f351b881bdedb
4
+ data.tar.gz: ff22ccd9c74e527411e2ce0187a4632ab998b7a9bfd964a3a90697348966bf66
5
5
  SHA512:
6
- metadata.gz: 06223a0eee0aa80c48b987aea5271aae10d4d2921265cd70725b9731615fbae62270684d23069502df922618e0f6d65e7b163291fb4fa8f9a0c63b3695fb5cce
7
- data.tar.gz: 664bb6c97c1a9fd16b4bc461de11cb466e5236297551ad3932816c1122b5e65f5442730bbee135f4f19fd07cadbb1fe752779916794d533af2cd33b6572ec4d8
6
+ metadata.gz: 5b4d64e99339ace29897b1178d5c0eaccd6be8a74a827bdbcc9614a5be4a02b6b5882e38e620f6f9c8e38fb90e723ee478f93c8fbb40d990188f8ea0f87882fd
7
+ data.tar.gz: 0f2e1b5fcbae5d5e9b34501dccbe863c7c70b075534cb406068336b2b35c4dd985ec1d370548e032b4cddf50480908e8048b6525da8bd5b7a15ad467417adac1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ## v2.0.1
4
+
5
+ ### 🐛 Bug Fixes
6
+
7
+ * Fixed 'table_name' issue in Ransack v3 preventing RansackUI from working with Rails 7.1+.
8
+
3
9
  ## v2.0.0
4
10
 
5
11
  ### 💥 Breaking Changes
@@ -0,0 +1,21 @@
1
+ require 'ransack/adapters/active_record/context.rb'
2
+
3
+ module Ransack
4
+ module Adapters
5
+ module ActiveRecord
6
+ Context.class_eval do
7
+ def type_for(attr)
8
+ return nil unless attr && attr.valid?
9
+ relation = attr.arel_attribute.relation
10
+ name = attr.arel_attribute.name.to_s
11
+ table = relation.respond_to?(:table_name) ? relation.table_name : relation.name
12
+ schema_cache = self.klass.connection.schema_cache
13
+ unless schema_cache.send(:data_source_exists?, table)
14
+ raise "No table named #{table} exists."
15
+ end
16
+ attr.klass.columns.find { |column| column.name == name }.type
17
+ end
18
+ end
19
+ end
20
+ end
21
+ end
@@ -1,3 +1,3 @@
1
1
  module RansackUI
2
- VERSION = '2.0.0'.freeze
2
+ VERSION = '2.0.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ransack_ui
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Broadbent
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-28 00:00:00.000000000 Z
11
+ date: 2024-09-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ransack_chronic
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.1.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: 1.1.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: ransack
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "<"
31
+ - - <
32
32
  - !ruby/object:Gem::Version
33
33
  version: '4'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "<"
38
+ - - <
39
39
  - !ruby/object:Gem::Version
40
40
  version: '4'
41
41
  description: Framework for building a search UI with Ransack
@@ -45,8 +45,8 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
- - ".gitignore"
49
- - ".rubocop_todo.yml"
48
+ - .gitignore
49
+ - .rubocop_todo.yml
50
50
  - CHANGELOG.md
51
51
  - Gemfile
52
52
  - LICENSE.txt
@@ -72,6 +72,7 @@ files:
72
72
  - lib/ransack_ui/controller_helpers.rb
73
73
  - lib/ransack_ui/rails/engine.rb
74
74
  - lib/ransack_ui/ransack_overrides/adapters/active_record/base.rb
75
+ - lib/ransack_ui/ransack_overrides/adapters/active_record/context.rb
75
76
  - lib/ransack_ui/ransack_overrides/configuration.rb
76
77
  - lib/ransack_ui/ransack_overrides/context.rb
77
78
  - lib/ransack_ui/ransack_overrides/helpers/form_builder.rb
@@ -91,16 +92,16 @@ require_paths:
91
92
  - lib
92
93
  required_ruby_version: !ruby/object:Gem::Requirement
93
94
  requirements:
94
- - - ">="
95
+ - - '>='
95
96
  - !ruby/object:Gem::Version
96
97
  version: '0'
97
98
  required_rubygems_version: !ruby/object:Gem::Requirement
98
99
  requirements:
99
- - - ">="
100
+ - - '>='
100
101
  - !ruby/object:Gem::Version
101
102
  version: '0'
102
103
  requirements: []
103
- rubygems_version: 3.5.9
104
+ rubygems_version: 3.0.9
104
105
  signing_key:
105
106
  specification_version: 4
106
107
  summary: UI Builder for Ransack