mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-25 15:22:58 +00:00
Compare commits
8 Commits
v5.0.0.alp
...
v5.0.0.bet
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f8b91e9cea | ||
|
|
7fa4d85ee3 | ||
|
|
70307293c6 | ||
|
|
f42e905cd1 | ||
|
|
35eb50aa40 | ||
|
|
3134072f01 | ||
|
|
797ba48036 | ||
|
|
f8e6480f58 |
2
Gemfile
2
Gemfile
@@ -2,7 +2,7 @@ source 'http://rubygems.org'
|
||||
|
||||
gemspec
|
||||
|
||||
gem 'rails', '~> 5.0.0'
|
||||
gem 'rails', '~> 5.2.4'
|
||||
gem 'rspec'
|
||||
gem 'rspec-rails', '~> 3.7'
|
||||
gem 'timecop'
|
||||
|
||||
@@ -30,7 +30,7 @@ If you a looking for the old version for Rails 4.x go here [https://github.com/a
|
||||
== Installation
|
||||
|
||||
# in Gemfile
|
||||
gem 'validates_timeliness', '~> 5.0.0.alpha3'
|
||||
gem 'validates_timeliness', '~> 5.0.0.beta1'
|
||||
|
||||
# Run bundler
|
||||
$ bundle install
|
||||
|
||||
@@ -12,7 +12,7 @@ module ValidatesTimeliness
|
||||
ValidatesTimeliness.ignore_restriction_errors = !Rails.env.test?
|
||||
end
|
||||
|
||||
initializer "validates_timeliness.initialize_timeliness_ambiguous_date_format", :after => 'load_config_initializers' do
|
||||
initializer "validates_timeliness.initialize_timeliness_ambiguous_date_format", :after => :load_config_initializers do
|
||||
if Timeliness.respond_to?(:ambiguous_date_format) # i.e. v0.4+
|
||||
# Set default for each new thread if you have changed the default using
|
||||
# the format switching methods.
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
module ValidatesTimeliness
|
||||
VERSION = '5.0.0.alpha5'
|
||||
VERSION = '5.0.0.beta2'
|
||||
end
|
||||
|
||||
@@ -17,8 +17,7 @@ module ModelHelpers
|
||||
|
||||
def with_each_person_value(attr_name, values)
|
||||
record = Person.new
|
||||
values = [values] unless values.is_a?(Array)
|
||||
values.each do |value|
|
||||
Array.wrap(values).each do |value|
|
||||
record.send("#{attr_name}=", value)
|
||||
yield record, value
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user