summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2024-11-10 15:29:42 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2024-11-10 15:29:42 +0000
commit1af81684260f68c958a04df8adcd4d13b11f143f (patch)
tree5572c9268b15474512248f4ec588a91b5e4dfd51
parent505981c6824e0133ba2718e4d5e1f4c277a4e900 (diff)
downloadredmine-1af81684260f68c958a04df8adcd4d13b11f143f.tar.gz
redmine-1af81684260f68c958a04df8adcd4d13b11f143f.zip
Use double splat operator for icons methods that are extending @sprite_icon@ (#23980).
git-svn-id: https://svn.redmine.org/redmine/trunk@23229 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--app/helpers/icons_helper.rb14
1 files changed, 7 insertions, 7 deletions
diff --git a/app/helpers/icons_helper.rb b/app/helpers/icons_helper.rb
index 5654f3a2f..f423a2898 100644
--- a/app/helpers/icons_helper.rb
+++ b/app/helpers/icons_helper.rb
@@ -36,20 +36,20 @@ module IconsHelper
end
end
- def file_icon(entry, name, size: DEFAULT_ICON_SIZE, css_class: nil)
+ def file_icon(entry, name, **options)
if entry.is_dir?
- sprite_icon("folder", name, size: size, css_class: css_class)
+ sprite_icon("folder", name, **options)
else
icon_name = icon_for_mime_type(Redmine::MimeType.css_class_of(name))
- sprite_icon(icon_name, name, size: size, css_class: css_class)
+ sprite_icon(icon_name, name, **options)
end
end
- def principal_icon(principal_class, size: DEFAULT_ICON_SIZE, css_class: nil)
- sprite_icon('group', size: size, css_class: css_class) if ['groupanonymous', 'groupnonmember', 'group'].include?(principal_class)
+ def principal_icon(principal_class, **options)
+ sprite_icon('group', **options) if ['groupanonymous', 'groupnonmember', 'group'].include?(principal_class)
end
- def activity_event_type_icon(event_type, size: DEFAULT_ICON_SIZE, css_class: nil)
+ def activity_event_type_icon(event_type, **options)
icon_name = case event_type
when 'reply'
'comments'
@@ -61,7 +61,7 @@ module IconsHelper
event_type
end
- sprite_icon(icon_name, size: size, css_class: css_class)
+ sprite_icon(icon_name, **options)
end
private