mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 07:53:49 +08:00
DEV: Prefer public_send
over send
.
This commit is contained in:
@ -48,7 +48,13 @@ module DiscourseNarrativeBot
|
||||
|
||||
begin
|
||||
old_data = @data.dup
|
||||
new_post = (@skip && @state != :end) ? skip_tutorial(next_state) : self.send(action)
|
||||
|
||||
new_post =
|
||||
if (@skip && @state != :end)
|
||||
skip_tutorial(next_state)
|
||||
else
|
||||
self.public_send(action)
|
||||
end
|
||||
|
||||
if new_post
|
||||
old_state = old_data[:state]
|
||||
|
@ -532,7 +532,10 @@ module DiscourseNarrativeBot
|
||||
end
|
||||
|
||||
def url_helpers(url, opts = {})
|
||||
Rails.application.routes.url_helpers.send(url, opts.merge(host: Discourse.base_url))
|
||||
Rails.application.routes.url_helpers.public_send(
|
||||
url,
|
||||
opts.merge(host: Discourse.base_url)
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user