mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-23 06:16:44 +00:00
fix custom_error_message hash bug using wrong match data index
This commit is contained in:
parent
db8dd9ac99
commit
525b3b9941
@ -115,7 +115,7 @@ module ValidatesTimeliness
|
|||||||
return @custom_error_messages if defined?(@custom_error_messages)
|
return @custom_error_messages if defined?(@custom_error_messages)
|
||||||
@custom_error_messages = configuration.inject({}) {|msgs, (k, v)|
|
@custom_error_messages = configuration.inject({}) {|msgs, (k, v)|
|
||||||
if md = /(.*)_message$/.match(k.to_s)
|
if md = /(.*)_message$/.match(k.to_s)
|
||||||
msgs[md[0].to_sym] = v
|
msgs[md[1].to_sym] = v
|
||||||
end
|
end
|
||||||
msgs
|
msgs
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user