6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# File 'lib/client_side_validations/active_model/format.rb', line 6
def client_side_hash(model, attribute, force = nil)
options = self.options.dup
if options[:with].respond_to?(:call)
return unless force
options[:with] = resolve_proc(options[:with], model)
build_client_side_hash(model, attribute, options)
elsif options[:without].respond_to?(:call)
return unless force
options[:without] = resolve_proc(options[:without], model)
build_client_side_hash(model, attribute, options)
else
super
end
end
|