18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
# File 'lib/xbar/association.rb', line 18
def default_xbar_opts(options)
if options[:before_add].is_a?(Array)
options[:before_add] << :set_connection_on_association
elsif options[:before_add].is_a?(Symbol)
options[:before_add] = [:set_connection_on_association, options[:before_add]]
else
options[:before_add] = :set_connection_on_association
end
if options[:before_remove].is_a?(Array)
options[:before_remove] << :set_connection_on_association
elsif options[:before_remove].is_a?(Symbol)
options[:before_remove] = [:set_connection_on_association, options[:before_remove]]
else
options[:before_remove] = :set_connection_on_association
end
end
|