Tag value method takes objects

This commit is contained in:
Adam Meehan 2018-05-15 19:27:15 +10:00
parent 8dc191a4cd
commit 90501a8e56

View File

@ -12,7 +12,7 @@ module ValidatesTimeliness
@template_object, @options, @html_options = template_object, options, html_options
end
def value
def value(object)
return super unless @template_object.params[@object_name]
pairs = @template_object.params[@object_name].select {|k,v| k =~ /^#{@method_name}\(/ }