mirror of
https://github.com/ditkrg/validates_timeliness.git
synced 2026-01-22 22:06:45 +00:00
Rails 5.x compatible Tag value method signature
This commit is contained in:
parent
84b1885b6b
commit
4fef42ac24
@ -16,7 +16,8 @@ module ValidatesTimeliness
|
||||
@template_object, @options, @html_options = template_object, options, html_options
|
||||
end
|
||||
|
||||
def value(object)
|
||||
# Splat args to support Rails 5.0 which expects object, and 5.2 which doesn't
|
||||
def value(*object)
|
||||
return super unless @template_object.params[@object_name]
|
||||
|
||||
pairs = @template_object.params[@object_name].select {|k,v| k =~ /^#{@method_name}\(/ }
|
||||
|
||||
Loading…
Reference in New Issue
Block a user