Skip to content

Commit

Permalink
link_or_text_for_countメソッドのリファクタリング
Browse files Browse the repository at this point in the history
  • Loading branch information
unikounio committed Apr 11, 2024
1 parent a183c91 commit 5abc0c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/helpers/users_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ def all_countries_with_subdivisions
end

def link_or_text_for_count(count, path)
count.zero? ? '0' : link_to(count, path)
link_to_if !count.zero?, count, path
end
end

0 comments on commit 5abc0c1

Please sign in to comment.