Skip to content

Commit

Permalink
Preparing v5.3.1
Browse files Browse the repository at this point in the history
Fixes #702
  • Loading branch information
UweKubosch committed Sep 15, 2023
1 parent d2a9c15 commit ac51022
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 4 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ https://github.com/bootstrap-ruby/bootstrap_form/releases

## Diffs

- [5.3.1](https://github.com/bootstrap-ruby/bootstrap_form/compare/v5.3.0...v5.3.1)
[Closed issues](https://github.com/bootstrap-ruby/bootstrap_form/issues?q=closed%3A2023-09-15T15%3A00..2023-09-15T16%3A00)
- [5.3.0](https://github.com/bootstrap-ruby/bootstrap_form/compare/v5.2.3...v5.3.0)
[Closed issues](https://github.com/bootstrap-ruby/bootstrap_form/issues?q=closed%3A2023-06-18T07%3A00..2023-09-15T16%3A00)
[Closed issues](https://github.com/bootstrap-ruby/bootstrap_form/issues?q=closed%3A2023-06-18T07%3A00..2023-09-15T15%3A00)
- [5.2.2](https://github.com/bootstrap-ruby/bootstrap_form/compare/v5.2.2...v5.2.3)
[Closed issues](https://github.com/bootstrap-ruby/bootstrap_form/issues?q=closed%3A2023-05-28T16%3A00..2023-06-18T07%3A00)
- [5.2.2](https://github.com/bootstrap-ruby/bootstrap_form/compare/v5.2.1...v5.2.2)
Expand Down
2 changes: 1 addition & 1 deletion demo/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: ..
specs:
bootstrap_form (5.3.0)
bootstrap_form (5.3.1)
actionpack (>= 6.1)
activemodel (>= 6.1)

Expand Down
6 changes: 5 additions & 1 deletion demo/app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ class User < ApplicationRecord

serialize :preferences, coder: JSON

validates :email, presence: true, length: { minimum: 5 }
validates :email, presence: true, length: { minimum: 5 }, if: :always
validates :terms, acceptance: { accept: true }

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

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

def always
true
end

def age
42
end
Expand Down
3 changes: 3 additions & 0 deletions lib/bootstrap_form/components/validation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ def presence_validators?(target, object, attribute)
end

def call_with_self(object, proc)
if proc.is_a? Symbol
proc = object.method(proc)
end
object.instance_exec(*[(object if proc.arity >= 1)].compact, &proc)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/bootstrap_form/version.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module BootstrapForm
VERSION = "5.3.0".freeze
VERSION = "5.3.1".freeze
REQUIRED_RAILS_VERSION = ">= 6.1".freeze
end

0 comments on commit ac51022

Please sign in to comment.