Skip to content

Commit

Permalink
Fix new safe performance offenses
Browse files Browse the repository at this point in the history
  • Loading branch information
tagliala committed Dec 16, 2023
1 parent c6ca746 commit 4e48688
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/client_side_validations/extender.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Extender
def extend(klass, validators)
validators.each do |validator|
require "client_side_validations/#{klass.underscore}/#{validator.downcase}"
const_get(klass)::Validations.const_get("#{validator}Validator").send :include, ClientSideValidations.const_get(klass).const_get(validator)
const_get(klass)::Validations.const_get(:"#{validator}Validator").send :include, ClientSideValidations.const_get(klass).const_get(validator)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion test/action_view/models/category.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Category

def initialize(params = {})
params.each do |attr, value|
public_send("#{attr}=", value)
public_send(:"#{attr}=", value)
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/action_view/models/comment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class Comment

def initialize(params = {})
params.each do |attr, value|
public_send("#{attr}=", value)
public_send(:"#{attr}=", value)
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/action_view/models/format_thing.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class FormatThing

def initialize(params = {})
params.each do |attr, value|
public_send("#{attr}=", value)
public_send(:"#{attr}=", value)
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/action_view/models/post.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Post

def initialize(params = {})
params.each do |attr, value|
public_send("#{attr}=", value)
public_send(:"#{attr}=", value)
end
end

Expand Down
2 changes: 1 addition & 1 deletion test/action_view/models/tag.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class Tag

def initialize(params = {})
params.each do |attr, value|
public_send("#{attr}=", value)
public_send(:"#{attr}=", value)
end
end

Expand Down

0 comments on commit 4e48688

Please sign in to comment.