mirror of
https://github.com/discourse/discourse.git
synced 2025-02-08 12:24:55 +00:00
DEV: More send
-> public_send
.
This commit is contained in:
parent
cac80cdc3b
commit
451f7842ff
@ -54,7 +54,7 @@ module Jobs
|
|||||||
# write to CSV file
|
# write to CSV file
|
||||||
CSV.open(absolute_path, "w") do |csv|
|
CSV.open(absolute_path, "w") do |csv|
|
||||||
csv << get_header
|
csv << get_header
|
||||||
send(export_method).each { |d| csv << d }
|
public_send(export_method).each { |d| csv << d }
|
||||||
end
|
end
|
||||||
|
|
||||||
# compress CSV file
|
# compress CSV file
|
||||||
|
@ -524,7 +524,7 @@ class Plugin::Instance
|
|||||||
provider = Auth::AuthProvider.new
|
provider = Auth::AuthProvider.new
|
||||||
|
|
||||||
Auth::AuthProvider.auth_attributes.each do |sym|
|
Auth::AuthProvider.auth_attributes.each do |sym|
|
||||||
provider.send "#{sym}=", opts.delete(sym) if opts.has_key?(sym)
|
provider.public_send("#{sym}=", opts.delete(sym)) if opts.has_key?(sym)
|
||||||
end
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
@ -60,7 +60,7 @@ class Search
|
|||||||
elsif !@type_filter.present? && send(type).length == Search.per_facet
|
elsif !@type_filter.present? && send(type).length == Search.per_facet
|
||||||
instance_variable_set("@more_#{type}".to_sym, true)
|
instance_variable_set("@more_#{type}".to_sym, true)
|
||||||
else
|
else
|
||||||
(send type) << object
|
(self.public_send(type)) << object
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -128,8 +128,8 @@ class SingleSignOn
|
|||||||
payload = {}
|
payload = {}
|
||||||
|
|
||||||
ACCESSORS.each do |k|
|
ACCESSORS.each do |k|
|
||||||
next if (val = send k) == nil
|
next if (val = public_send(k)) == nil
|
||||||
payload[k] = val
|
payload[k] = val
|
||||||
end
|
end
|
||||||
|
|
||||||
@custom_fields&.each do |k, v|
|
@custom_fields&.each do |k, v|
|
||||||
|
@ -9,4 +9,4 @@ module Stylesheet
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
::SassC::Script::Functions.send :include, Stylesheet::ScssFunctions
|
::SassC::Script::Functions.public_send(:include, Stylesheet::ScssFunctions)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user