Skip to content

Commit

Permalink
[#55021] remove unnecessary html_safe
Browse files Browse the repository at this point in the history
Both id and identifier are simple strings. No need no mark them as
html_safe.
  • Loading branch information
Tobias Dillmann committed Sep 11, 2024
1 parent a8d365e commit 76de79e
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions app/components/projects/row_component.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,11 @@ def required_disk_space
end

def id
content = "".html_safe

content << project.id.to_s
content
project.id.to_s
end

def identifier

Check notice on line 114 in app/components/projects/row_component.rb

View workflow job for this annotation

GitHub Actions / rubocop

[rubocop] app/components/projects/row_component.rb#L114 <Rails/Delegate>

Use `delegate` to define delegations.
Raw output
app/components/projects/row_component.rb:114:5: C: Rails/Delegate: Use `delegate` to define delegations.
content = "".html_safe

content << project.identifier
content
project.identifier
end

def name
Expand Down

0 comments on commit 76de79e

Please sign in to comment.