Skip to content

Commit ac51022

Browse files
committed
Preparing v5.3.1
Fixes #702
1 parent d2a9c15 commit ac51022

File tree

5 files changed

+13
-4
lines changed

5 files changed

+13
-4
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@ https://github.com/bootstrap-ruby/bootstrap_form/releases
66

77
## Diffs
88

9+
- [5.3.1](https://github.com/bootstrap-ruby/bootstrap_form/compare/v5.3.0...v5.3.1)
10+
[Closed issues](https://github.com/bootstrap-ruby/bootstrap_form/issues?q=closed%3A2023-09-15T15%3A00..2023-09-15T16%3A00)
911
- [5.3.0](https://github.com/bootstrap-ruby/bootstrap_form/compare/v5.2.3...v5.3.0)
10-
[Closed issues](https://github.com/bootstrap-ruby/bootstrap_form/issues?q=closed%3A2023-06-18T07%3A00..2023-09-15T16%3A00)
12+
[Closed issues](https://github.com/bootstrap-ruby/bootstrap_form/issues?q=closed%3A2023-06-18T07%3A00..2023-09-15T15%3A00)
1113
- [5.2.2](https://github.com/bootstrap-ruby/bootstrap_form/compare/v5.2.2...v5.2.3)
1214
[Closed issues](https://github.com/bootstrap-ruby/bootstrap_form/issues?q=closed%3A2023-05-28T16%3A00..2023-06-18T07%3A00)
1315
- [5.2.2](https://github.com/bootstrap-ruby/bootstrap_form/compare/v5.2.1...v5.2.2)

demo/Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: ..
33
specs:
4-
bootstrap_form (5.3.0)
4+
bootstrap_form (5.3.1)
55
actionpack (>= 6.1)
66
activemodel (>= 6.1)
77

demo/app/models/user.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ class User < ApplicationRecord
33

44
serialize :preferences, coder: JSON
55

6-
validates :email, presence: true, length: { minimum: 5 }
6+
validates :email, presence: true, length: { minimum: 5 }, if: :always
77
validates :terms, acceptance: { accept: true }
88

99
# Conditional (always disabled) validators used in tests
@@ -15,6 +15,10 @@ class User < ApplicationRecord
1515

1616
has_rich_text(:life_story) if Rails::VERSION::STRING > "6"
1717

18+
def always
19+
true
20+
end
21+
1822
def age
1923
42
2024
end

lib/bootstrap_form/components/validation.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ def presence_validators?(target, object, attribute)
4747
end
4848

4949
def call_with_self(object, proc)
50+
if proc.is_a? Symbol
51+
proc = object.method(proc)
52+
end
5053
object.instance_exec(*[(object if proc.arity >= 1)].compact, &proc)
5154
end
5255

lib/bootstrap_form/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module BootstrapForm
2-
VERSION = "5.3.0".freeze
2+
VERSION = "5.3.1".freeze
33
REQUIRED_RAILS_VERSION = ">= 6.1".freeze
44
end

0 commit comments

Comments
 (0)