autocomplete_for 1.2 → 1.4

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: 1a866f0de096b328e242405a2f80cdb0b4427bba76c4b82802db7caa65bdbdb1
4
- data.tar.gz: 0711f05bd588f7813bf76dcc6ce9c943dd9c3e750c9da6a737c68a472567f21f
3
+ metadata.gz: 90c7f3e5a8d3593183bde543938e800d27c914497728996d7fdeade8f6eca2bc
4
+ data.tar.gz: 957783d061eab59cce4e52222026ef375a241d16af3eb64aa063c1a9ae7b5bc1
5
5
  SHA512:
6
- metadata.gz: 0646dee01dff94a2cf93e99b344f155769cddf7c22e237a713f9897fe0237218761c11f5273624405cf09a6dfd1febbcc9e08959b1ae222ce84e03c5235f2cf9
7
- data.tar.gz: 1c80fb60a11a62d12eb978e30ea2b3d5a89e5bcefbc27836e30a1bef2b57f3d272046366ae046626d04d522ddaccd5bead10b6b7cd572ace1197339d31d7d86f
6
+ metadata.gz: 1ff73b05fff8cf093bf9aa82d93edef5651091bd54f14ea8d2f6ee8160d7071d53a3dd6428b214aeef281db68c9172c19fada919891e40cbe9864cc78942ecae
7
+ data.tar.gz: 3ebe257e707aefb384af0435492a2de08c65b10aa11c4fb68b6243181a495ecad109f557f2e84ccde73d9b423594c754863164584a1d7025ac51910ceda9c432
data/README.markdown CHANGED
@@ -5,8 +5,6 @@
5
5
  This version was introduced to support Rails 5. It depends on activerecord ~> 5.0 and contains several large gem upgrades.
6
6
  This is not a backwards compatible upgrade, and introduces many breaking changes if there is no gem compatibility.
7
7
 
8
- For Rails 4 support please use: [v0.3.0](https://github.com/nulogy/autocomplete_for/tree/v0.3.0)
9
-
10
8
  AutocompleteFor
11
9
  ===============
12
10
 
@@ -54,5 +52,3 @@ Errors are generated automatically if the given information does not correspond
54
52
 
55
53
  ### Running the tests
56
54
  You can run the unit tests using `rake`
57
-
58
- Copyright (c) 2019 Nulogy Corporation, released under the MIT license
@@ -6,8 +6,7 @@ module AutocompleteFor
6
6
  end
7
7
 
8
8
  module ClassMethods
9
- def autocomplete_for(association, field, options = {}, &block)
10
- allow_nil = options[:allow_nil] || false
9
+ def autocomplete_for(association, field, allow_nil: false, &block)
11
10
  validate :"validate_#{association}_by_#{field}"
12
11
  before_validation :"associate_#{association}_by_#{field}"
13
12
  instance_variable_set(:"@#{association}_#{field}_allow_nil", allow_nil)
@@ -96,7 +95,7 @@ module AutocompleteFor
96
95
  return if self.class.instance_variable_get(error_fields_name).any? { |ef| errors[ef].any? }
97
96
  return unless send(:read_attribute_for_validation, association.to_sym).blank?
98
97
 
99
- errors.add(association.to_sym, :blank, options)
98
+ errors.add(association.to_sym, :blank)
100
99
  end
101
100
  end
102
101
  end
@@ -104,4 +103,4 @@ module AutocompleteFor
104
103
  end
105
104
  end
106
105
 
107
- ActiveRecord::Base.send(:include, AutocompleteFor) # rubocop:disable Lint/SendWithMixinArgument
106
+ ActiveRecord::Base.include(AutocompleteFor)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AutocompleteFor
4
- VERSION = "1.2"
4
+ VERSION = "1.4"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autocomplete_for
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.2'
4
+ version: '1.4'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Kirby
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-07-13 00:00:00.000000000 Z
12
+ date: 2023-03-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -17,20 +17,20 @@ dependencies:
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '5.1'
20
+ version: '6.1'
21
21
  - - "<"
22
22
  - !ruby/object:Gem::Version
23
- version: '7.0'
23
+ version: '7.1'
24
24
  type: :runtime
25
25
  prerelease: false
26
26
  version_requirements: !ruby/object:Gem::Requirement
27
27
  requirements:
28
28
  - - ">="
29
29
  - !ruby/object:Gem::Version
30
- version: '5.1'
30
+ version: '6.1'
31
31
  - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '7.0'
33
+ version: '7.1'
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: appraisal
36
36
  requirement: !ruby/object:Gem::Requirement
@@ -51,20 +51,20 @@ dependencies:
51
51
  requirements:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '6.0'
54
+ version: '6.1'
55
55
  - - "<"
56
56
  - !ruby/object:Gem::Version
57
- version: '7.0'
57
+ version: '7.1'
58
58
  type: :development
59
59
  prerelease: false
60
60
  version_requirements: !ruby/object:Gem::Requirement
61
61
  requirements:
62
62
  - - ">="
63
63
  - !ruby/object:Gem::Version
64
- version: '6.0'
64
+ version: '6.1'
65
65
  - - "<"
66
66
  - !ruby/object:Gem::Version
67
- version: '7.0'
67
+ version: '7.1'
68
68
  - !ruby/object:Gem::Dependency
69
69
  name: rake
70
70
  requirement: !ruby/object:Gem::Requirement
@@ -85,42 +85,42 @@ dependencies:
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '5.0'
88
+ version: '6.0'
89
89
  type: :development
90
90
  prerelease: false
91
91
  version_requirements: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: '5.0'
95
+ version: '6.0'
96
96
  - !ruby/object:Gem::Dependency
97
97
  name: rubocop
98
98
  requirement: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '1.18'
102
+ version: '1.48'
103
103
  type: :development
104
104
  prerelease: false
105
105
  version_requirements: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: '1.18'
109
+ version: '1.48'
110
110
  - !ruby/object:Gem::Dependency
111
111
  name: sqlite3
112
112
  requirement: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
- version: '1.4'
116
+ version: '1.6'
117
117
  type: :development
118
118
  prerelease: false
119
119
  version_requirements: !ruby/object:Gem::Requirement
120
120
  requirements:
121
121
  - - "~>"
122
122
  - !ruby/object:Gem::Version
123
- version: '1.4'
123
+ version: '1.6'
124
124
  description: Model-side logic for autocompleting belongs_to associations
125
125
  email: skirby@gmail.com
126
126
  executables: []
@@ -141,6 +141,7 @@ metadata:
141
141
  changelog_uri: https://github.com/nulogy/autocomplete_for/blob/master/CHANGELOG.md
142
142
  source_code_uri: https://github.com/nulogy/autocomplete_for
143
143
  bug_tracker_uri: https://github.com/nulogy/autocomplete_for/issues
144
+ rubygems_mfa_required: 'true'
144
145
  post_install_message:
145
146
  rdoc_options: []
146
147
  require_paths:
@@ -149,14 +150,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
149
150
  requirements:
150
151
  - - ">="
151
152
  - !ruby/object:Gem::Version
152
- version: '2.6'
153
+ version: '3.0'
153
154
  required_rubygems_version: !ruby/object:Gem::Requirement
154
155
  requirements:
155
156
  - - ">="
156
157
  - !ruby/object:Gem::Version
157
158
  version: '0'
158
159
  requirements: []
159
- rubygems_version: 3.1.6
160
+ rubygems_version: 3.4.8
160
161
  signing_key:
161
162
  specification_version: 4
162
163
  summary: Autocomplete for models