diff --git a/app/views/admin/settings/mail_notifications_settings/show.html.erb b/app/views/admin/settings/mail_notifications_settings/show.html.erb
index 0fe0f43ff7e..9ba8caf1419 100644
--- a/app/views/admin/settings/mail_notifications_settings/show.html.erb
+++ b/app/views/admin/settings/mail_notifications_settings/show.html.erb
@@ -69,7 +69,7 @@ See COPYRIGHT and LICENSE files for more details.
<% end %>
<%
- email_methods = [:smtp, :sendmail]
+ email_methods = %i[smtp sendmail]
email_methods << :letter_opener if Rails.env.development?
%>
<%= content_tag :fieldset, id: "mail_configuration", class: "form--fieldset" do %>
@@ -79,7 +79,7 @@ See COPYRIGHT and LICENSE files for more details.
<%= setting_text_field :smtp_address, container_class: "-middle" %>
<%= setting_text_field :smtp_port, size: 6, container_class: "-xslim" %>
<%= setting_text_field :smtp_domain, container_class: "-middle" %>
- <%= setting_select(:smtp_authentication, [:none, :plain, :login, :cram_md5], container_class: "-slim") %>
+ <%= setting_select(:smtp_authentication, %i[none plain login cram_md5], container_class: "-slim") %>
<%= setting_text_field :smtp_user_name, container_class: "-middle" %>
<%= setting_password :smtp_password, container_class: "-middle" %>
<%= setting_check_box :smtp_enable_starttls_auto %>
diff --git a/app/views/attribute_help_texts/_tab.html.erb b/app/views/attribute_help_texts/_tab.html.erb
index ff36da20fb9..dc6714ea7da 100644
--- a/app/views/attribute_help_texts/_tab.html.erb
+++ b/app/views/attribute_help_texts/_tab.html.erb
@@ -53,7 +53,7 @@
<%= link_to(
op_icon("icon icon-delete"),
- (attribute_help_text_path(attribute_help_text)),
+ attribute_help_text_path(attribute_help_text),
method: :delete,
data: { confirm: I18n.t(:text_are_you_sure) },
title: t(:button_delete)
diff --git a/app/views/colors/_color_autocomplete_field.html.erb b/app/views/colors/_color_autocomplete_field.html.erb
index 9b2eaf3ed27..4609d2ee1aa 100644
--- a/app/views/colors/_color_autocomplete_field.html.erb
+++ b/app/views/colors/_color_autocomplete_field.html.erb
@@ -10,7 +10,7 @@
<%= content_tag(
"opce-colors-autocompleter",
"",
- class: "colors-autocomplete form--select-container " + "#{container_class.present? ? container_class : '-middle'}",
+ class: "colors-autocomplete form--select-container " + (container_class.present? ? container_class : "-middle").to_s,
data: { colors: options_for_colors(object),
selected_color: selected_color(object),
highlight_text_inline: highlight_text_inline,
diff --git a/app/views/common/error.html.erb b/app/views/common/error.html.erb
index ea265ef425a..c5d521ab212 100644
--- a/app/views/common/error.html.erb
+++ b/app/views/common/error.html.erb
@@ -27,6 +27,6 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
-<%= call_hook(:view_common_error_details, { params: params, project: ((defined? @project) ? @project : nil) }) %>
+<%= call_hook(:view_common_error_details, { params: params, project: (defined?(@project) ? @project : nil) }) %>
<% html_title h(status) %>
diff --git a/app/views/custom_fields/_tab.html.erb b/app/views/custom_fields/_tab.html.erb
index 610c95b735c..c7e5562b703 100644
--- a/app/views/custom_fields/_tab.html.erb
+++ b/app/views/custom_fields/_tab.html.erb
@@ -155,7 +155,7 @@ See COPYRIGHT and LICENSE files for more details.
|
<%= link_to(
op_icon("icon icon-delete"),
- (custom_field_path(custom_field)),
+ custom_field_path(custom_field),
method: :delete,
data: { confirm: I18n.t(:text_are_you_sure) },
title: t(:button_delete)
diff --git a/app/views/enterprises/_current.html.erb b/app/views/enterprises/_current.html.erb
index 4a0ae52a6bb..c1d737fff8e 100644
--- a/app/views/enterprises/_current.html.erb
+++ b/app/views/enterprises/_current.html.erb
@@ -5,7 +5,7 @@
data-domain="<%= @current_token.try(:domain) %>"
data-user-count="<%= @current_token.restrictions.nil? ? t("js.admin.enterprise.upsale.unlimited") : @current_token.restrictions[:active_user_count] %>"
data-starts-at="<%= format_date @current_token.starts_at %>"
- data-expires-at="<%= (@current_token.will_expire?) ? (format_date @current_token.expires_at) : t("js.admin.enterprise.upsale.unlimited") %>"
+ data-expires-at="<%= @current_token.will_expire? ? (format_date @current_token.expires_at) : t("js.admin.enterprise.upsale.unlimited") %>"
data-is-expired="<%= @current_token.expired?(reprieve: false) %>"
data-reprieve-days-left="<%= @current_token.reprieve_days_left %>">
diff --git a/app/views/homescreen/index.html.erb b/app/views/homescreen/index.html.erb
index 1d19517b224..0354aee8f66 100644
--- a/app/views/homescreen/index.html.erb
+++ b/app/views/homescreen/index.html.erb
@@ -40,7 +40,7 @@ See COPYRIGHT and LICENSE files for more details.
<% @homescreen[:blocks].each do |block| %>
<% if block[:if].nil? || instance_eval(&block[:if]) %>
- <%= render partial: "homescreen/blocks/#{block[:partial]}", locals: (block[:locals] || {}) %>
+ <%= render partial: "homescreen/blocks/#{block[:partial]}", locals: block[:locals] || {} %>
<% end %>
<% end %>
diff --git a/app/views/layouts/mailer.text.erb b/app/views/layouts/mailer.text.erb
index b3f26d1a0ec..d6160327488 100644
--- a/app/views/layouts/mailer.text.erb
+++ b/app/views/layouts/mailer.text.erb
@@ -28,8 +28,8 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
<%= Setting.localized_emails_header %>
-<%= call_hook(:view_layouts_mailer_plain_before_content, self.assigns) %>
+<%= call_hook(:view_layouts_mailer_plain_before_content, assigns) %>
<%= yield %>
-<%= call_hook(:view_layouts_mailer_plain_after_content, self.assigns) %>
+<%= call_hook(:view_layouts_mailer_plain_after_content, assigns) %>
--
<%= Setting.localized_emails_footer %>
diff --git a/app/views/ldap_auth_sources/_form.html.erb b/app/views/ldap_auth_sources/_form.html.erb
index 1e1b2143c09..8ffca274b2c 100644
--- a/app/views/ldap_auth_sources/_form.html.erb
+++ b/app/views/ldap_auth_sources/_form.html.erb
@@ -137,7 +137,7 @@ See COPYRIGHT and LICENSE files for more details.
<%= f.password_field "account_password",
label: LdapAuthSource.human_attribute_name(:password),
- placeholder: ((@ldap_auth_source.new_record? || @ldap_auth_source.account_password.blank?) ? "" : ("●" * 15)),
+ placeholder: (@ldap_auth_source.new_record? || @ldap_auth_source.account_password.blank? ? "" : ("●" * 15)),
autocomplete: "off",
container_class: "-middle" %>
diff --git a/app/views/my/_password_form_fields.html.erb b/app/views/my/_password_form_fields.html.erb
index a2501eaba64..58ca3971439 100644
--- a/app/views/my/_password_form_fields.html.erb
+++ b/app/views/my/_password_form_fields.html.erb
@@ -44,7 +44,7 @@ See COPYRIGHT and LICENSE files for more details.
nil,
size: 25,
required: true,
- container_class: (defined? input_size) ? "-#{input_size}" : "" %>
+ container_class: defined?(input_size) ? "-#{input_size}" : "" %>
@@ -57,7 +57,7 @@ See COPYRIGHT and LICENSE files for more details.
"aria-describedby" => "new_password_tooltip",
required: true,
class: "advanced-tooltip-trigger",
- container_class: (defined? input_size) ? "-#{input_size}" : "" %>
+ container_class: defined?(input_size) ? "-#{input_size}" : "" %>
<%= render_password_complexity_hint %>
@@ -74,17 +74,17 @@ See COPYRIGHT and LICENSE files for more details.
"aria-describedby" => "confirm_password_tooltip",
size: 25,
class: "advanced-tooltip-trigger",
- container_class: (defined? input_size) ? "-#{input_size}" : "" %>
+ container_class: defined?(input_size) ? "-#{input_size}" : "" %>
<%= I18n.t(
:confirm,
- scope: [:activerecord, :errors, :models, :user, :attributes, :password, :match]
+ scope: %i[activerecord errors models user attributes password match]
) %>
<%= I18n.t(
:description,
- scope: [:activerecord, :errors, :models, :user, :attributes, :password, :match]
+ scope: %i[activerecord errors models user attributes password match]
) %>
diff --git a/app/views/my/access_token_partials/_oauth_tokens_section.html.erb b/app/views/my/access_token_partials/_oauth_tokens_section.html.erb
index 61b022efd13..caadcb1ca92 100644
--- a/app/views/my/access_token_partials/_oauth_tokens_section.html.erb
+++ b/app/views/my/access_token_partials/_oauth_tokens_section.html.erb
@@ -50,7 +50,7 @@ See COPYRIGHT and LICENSE files for more details.
} %>
|
<% granted_applications.each do |application, tokens| %>
- <% latest = tokens.sort_by(&:created_at).last %>
+ <% latest = tokens.max_by(&:created_at) %>
<%= t("oauth.application.named", name: application.name) %>
diff --git a/app/views/placeholder_users/deletion_info.html.erb b/app/views/placeholder_users/deletion_info.html.erb
index ac18f70e7e9..c8cf0834cc4 100644
--- a/app/views/placeholder_users/deletion_info.html.erb
+++ b/app/views/placeholder_users/deletion_info.html.erb
@@ -27,7 +27,7 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
<% name = @placeholder_user.name %>
-<% html_title(t(:label_administration), "#{t('placeholder_users.deletion_info.heading', name: name)}") -%>
+<% html_title(t(:label_administration), t("placeholder_users.deletion_info.heading", name: name).to_s) -%>
<%= labelled_tabular_form_for(
:placeholder_user,
diff --git a/app/views/projects/destroy_info.html.erb b/app/views/projects/destroy_info.html.erb
index a0811099322..a27bf2fff03 100644
--- a/app/views/projects/destroy_info.html.erb
+++ b/app/views/projects/destroy_info.html.erb
@@ -51,7 +51,7 @@ See COPYRIGHT and LICENSE files for more details.
<%= t("project.destroy.confirmation", identifier: @project_to_destroy.identifier) %>
<% if @project_to_destroy.descendants.any? %>
- <% descendants = h(@project_to_destroy.descendants.collect { |p| p.to_s }.join(", ")) %>
+ <% descendants = h(@project_to_destroy.descendants.collect(&:to_s).join(", ")) %>
<%= t("project.destroy.subprojects_confirmation", value: "#{h(descendants)}").html_safe %>
<% end %>
diff --git a/app/views/projects/settings/repository/subversion/_existing.html.erb b/app/views/projects/settings/repository/subversion/_existing.html.erb
index b3e883f6c98..0807381f6c4 100644
--- a/app/views/projects/settings/repository/subversion/_existing.html.erb
+++ b/app/views/projects/settings/repository/subversion/_existing.html.erb
@@ -62,7 +62,7 @@ See COPYRIGHT and LICENSE files for more details.
label: t("repositories.subversion.password"),
name: "ignore",
id: "repository-password-placeholder",
- value: ((repository.new_record? || repository.password.blank?) ? "" : ("x" * 15)),
+ value: (repository.new_record? || repository.password.blank? ? "" : ("x" * 15)),
container_class: "-middle"
) %>
<%=
diff --git a/app/views/repositories/_dir_list_content.html.erb b/app/views/repositories/_dir_list_content.html.erb
index 7077340819b..8b21c603376 100644
--- a/app/views/repositories/_dir_list_content.html.erb
+++ b/app/views/repositories/_dir_list_content.html.erb
@@ -78,9 +78,9 @@ See COPYRIGHT and LICENSE files for more details.
|
<%= depth %> |
<%= (entry.size ? number_to_human_size(entry.size, precision: 3) : "?") unless entry.dir? %> |
- <% changeset = @project.repository.find_changeset_by_name(entry.lastrev.identifier) if entry.lastrev && entry.lastrev.identifier %>
+ <% changeset = @project.repository.find_changeset_by_name(entry.lastrev.identifier) if entry.lastrev&.identifier %>
<%= link_to_revision(changeset, @project) if changeset %> |
- <%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev && entry.lastrev.time %> |
+ <%= distance_of_time_in_words(entry.lastrev.time, Time.now) if entry.lastrev&.time %> |
<%= if entry.lastrev
changeset.nil? ? h(replace_invalid_utf8(entry.lastrev.author.to_s.split("<").first)) : h(changeset.author)
end %> |
diff --git a/app/views/repositories/show.html.erb b/app/views/repositories/show.html.erb
index 8a47abdc934..83f08b3861a 100644
--- a/app/views/repositories/show.html.erb
+++ b/app/views/repositories/show.html.erb
@@ -118,7 +118,7 @@ See COPYRIGHT and LICENSE files for more details.
<% end %>
<%
- has_branches = (!@repository.branches.nil? && !@repository.branches.empty?)
+ has_branches = !@repository.branches.nil? && !@repository.branches.empty?
sep = ""
%>
diff --git a/app/views/roles/autocomplete_for_role.json.erb b/app/views/roles/autocomplete_for_role.json.erb
index 8ed152efa68..dd3bf3f3441 100644
--- a/app/views/roles/autocomplete_for_role.json.erb
+++ b/app/views/roles/autocomplete_for_role.json.erb
@@ -37,7 +37,7 @@ See COPYRIGHT and LICENSE files for more details.
"name": <%= role.name.to_json.html_safe %>
} <%= "," unless ix == @roles.length - 1 %>
<% end %> ],
- "total": <%= @total ? @total : @roles.size %>,
- "more": <%= @more ? @more : 0 %>
+ "total": <%= @total || @roles.size %>,
+ "more": <%= @more || 0 %>
}
}
diff --git a/app/views/search/index.html.erb b/app/views/search/index.html.erb
index cd3abbc614d..d51723d1467 100644
--- a/app/views/search/index.html.erb
+++ b/app/views/search/index.html.erb
@@ -51,8 +51,8 @@ See COPYRIGHT and LICENSE files for more details.
<% event_type = e.event_type == "meeting" ? "meetings" : e.event_type %>
- <% event_type = e.event_type == "budget" ? "budget" : event_type %>
- <% event_type = e.event_type == "reply" ? "forums" : event_type %>
+ <% event_type = "budget" if e.event_type == "budget" %>
+ <% event_type = "forums" if e.event_type == "reply" %>
<%= icon_wrapper("icon-context icon-#{event_type}", e.event_name) %>
<% if e.project != @project %>
diff --git a/app/views/user_mailer/news_added.html.erb b/app/views/user_mailer/news_added.html.erb
index 4e635624387..28ef3745901 100644
--- a/app/views/user_mailer/news_added.html.erb
+++ b/app/views/user_mailer/news_added.html.erb
@@ -28,6 +28,6 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
<%= link_to @news.title, news_url(@news) %>
-<%= @news.author.name if @news.author %>
+<%= @news.author&.name %>
<%= format_text @news.description, only_path: false %>
diff --git a/app/views/user_mailer/news_added.text.erb b/app/views/user_mailer/news_added.text.erb
index 2609a2957cb..90701cd335e 100644
--- a/app/views/user_mailer/news_added.text.erb
+++ b/app/views/user_mailer/news_added.text.erb
@@ -29,6 +29,6 @@ See COPYRIGHT and LICENSE files for more details.
<%= @news.title %>
<%= news_url(@news) %>
-<%= @news.author.name if @news.author %>
+<%= @news.author&.name %>
<%= @news.description %>
diff --git a/app/views/users/_preferences.html.erb b/app/views/users/_preferences.html.erb
index 60b7eae2ddb..d99ee25d5a1 100644
--- a/app/views/users/_preferences.html.erb
+++ b/app/views/users/_preferences.html.erb
@@ -31,7 +31,7 @@ See COPYRIGHT and LICENSE files for more details.
"time_zone",
form: pref_fields,
include_blank: false,
- container_class: (defined? input_size) ? "-#{input_size}" : "-wide"
+ container_class: defined?(input_size) ? "-#{input_size}" : "-wide"
) %>
<%= pref_fields.select :theme, theme_options_for_select, container_class: "-middle" %>
@@ -43,7 +43,7 @@ See COPYRIGHT and LICENSE files for more details.
<%= pref_fields.select :comments_sorting,
[[t("activities.work_packages.activity_tab.label_sort_asc"), "asc"],
[t("activities.work_packages.activity_tab.label_sort_desc"), "desc"]],
- container_class: (defined? input_size) ? "-#{input_size}" : "" %>
+ container_class: defined?(input_size) ? "-#{input_size}" : "" %>
<%= pref_fields.check_box :warn_on_leaving_unsaved %>
<%= pref_fields.check_box :auto_hide_popups %>
diff --git a/app/views/users/change_status_info.html.erb b/app/views/users/change_status_info.html.erb
index 7199e6916ac..42a1d818807 100644
--- a/app/views/users/change_status_info.html.erb
+++ b/app/views/users/change_status_info.html.erb
@@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
See COPYRIGHT and LICENSE files for more details.
++#%>
-<% html_title(t(:label_administration), "#{t(:label_change_status_of_user, username: @user.name)}") -%>
+<% html_title(t(:label_administration), t(:label_change_status_of_user, username: @user.name).to_s) -%>
<% local_assigns[:additional_breadcrumb] = @user.name %>
<% new_status = t("user.#{@status_change}") %>
diff --git a/app/views/users/deletion_info.html.erb b/app/views/users/deletion_info.html.erb
index 62ab71784f6..0d0640dd062 100644
--- a/app/views/users/deletion_info.html.erb
+++ b/app/views/users/deletion_info.html.erb
@@ -28,7 +28,7 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
<% layout = local_assigns[:layout] %>
-<% html_title(layout == "my" ? t(:label_my_account) : t(:label_administration), "#{t('account.deletion_info.heading', name: @user.name)}") -%>
+<% html_title(layout == "my" ? t(:label_my_account) : t(:label_administration), t("account.deletion_info.heading", name: @user.name).to_s) -%>
<%= render ::Users::DeletePageHeaderComponent.new(layout: layout, user: @user) %>
diff --git a/app/views/work_package_mailer/mentioned.text.erb b/app/views/work_package_mailer/mentioned.text.erb
index 3c22f6ccd30..c3ef81556b7 100644
--- a/app/views/work_package_mailer/mentioned.text.erb
+++ b/app/views/work_package_mailer/mentioned.text.erb
@@ -1,5 +1,5 @@
<%= I18n.t(:"mail.salutation", user: @user.firstname) %>
-<%= "#{I18n.t(:"mail.work_packages.mentioned_by", user: @journal.user)}" %>
+<%= I18n.t(:"mail.work_packages.mentioned_by", user: @journal.user).to_s %>
<%= "-" * 100 %>
diff --git a/app/views/work_packages/reports/_report.html.erb b/app/views/work_packages/reports/_report.html.erb
index dac2caea6d8..f72162a3dc1 100644
--- a/app/views/work_packages/reports/_report.html.erb
+++ b/app/views/work_packages/reports/_report.html.erb
@@ -65,7 +65,7 @@ See COPYRIGHT and LICENSE files for more details.
<%= link_to h(row.name),
project_report_property_path(
(row.is_a?(Project) ? row : @project),
- "#{report.field}",
+ report.field.to_s,
row.id
) %>
@@ -76,7 +76,7 @@ See COPYRIGHT and LICENSE files for more details.
project_report_property_status_path(
(row.is_a?(Project) ? row : @project),
status.id,
- "#{report.field}",
+ report.field.to_s,
row.id
) %>
@@ -86,7 +86,7 @@ See COPYRIGHT and LICENSE files for more details.
{ report.field => row.id, "closed" => 0 },
project_report_property_open_path(
(row.is_a?(Project) ? row : @project),
- "#{report.field}",
+ report.field.to_s,
row.id
) %>
@@ -95,7 +95,7 @@ See COPYRIGHT and LICENSE files for more details.
{ report.field => row.id, "closed" => 1 },
project_report_property_closed_path(
(row.is_a?(Project) ? row : @project),
- "#{report.field}",
+ report.field.to_s,
row.id
) %>
@@ -104,7 +104,7 @@ See COPYRIGHT and LICENSE files for more details.
{ report.field => row.id },
project_report_property_path(
(row.is_a?(Project) ? row : @project),
- "#{report.field}",
+ report.field.to_s,
row.id
) %>
diff --git a/app/views/workflows/_form.html.erb b/app/views/workflows/_form.html.erb
index 1e67b5f32db..007d07da4a5 100644
--- a/app/views/workflows/_form.html.erb
+++ b/app/views/workflows/_form.html.erb
@@ -50,11 +50,11 @@ See COPYRIGHT and LICENSE files for more details.
<% for new_status in @statuses %>
<%= link_to_function(
- icon_wrapper("icon-context icon-checkmark", "#{t(:label_check_uncheck_all_in_column)}"),
+ icon_wrapper("icon-context icon-checkmark", t(:label_check_uncheck_all_in_column).to_s),
"OpenProject.helpers.toggleCheckboxesBySelector('table.transitions-#{name} input.new-status-#{new_status.id}')",
class: "no-decoration-on-hover",
- title: "#{t(:label_check_uncheck_all_in_column)}",
- alt: "#{t(:label_check_uncheck_all_in_column)}"
+ title: t(:label_check_uncheck_all_in_column).to_s,
+ alt: t(:label_check_uncheck_all_in_column).to_s
) %>
<%= h new_status.name %>
|
@@ -66,11 +66,11 @@ See COPYRIGHT and LICENSE files for more details.
|
<%= link_to_function(
- icon_wrapper("icon-context icon-checkmark", "#{t(:label_check_uncheck_all_in_row)}"),
+ icon_wrapper("icon-context icon-checkmark", t(:label_check_uncheck_all_in_row).to_s),
"OpenProject.helpers.toggleCheckboxesBySelector('table.transitions-#{name} input.old-status-#{old_status.id}')",
class: "no-decoration-on-hover",
- title: "#{t(:label_check_uncheck_all_in_row)}",
- alt: "#{t(:label_check_uncheck_all_in_row)}"
+ title: t(:label_check_uncheck_all_in_row).to_s,
+ alt: t(:label_check_uncheck_all_in_row).to_s
) %>
<%= h old_status.name %>
|
diff --git a/modules/auth_saml/app/components/saml/providers/view_component.html.erb b/modules/auth_saml/app/components/saml/providers/view_component.html.erb
index 122a5afc559..0c3c3ea4b9a 100644
--- a/modules/auth_saml/app/components/saml/providers/view_component.html.erb
+++ b/modules/auth_saml/app/components/saml/providers/view_component.html.erb
@@ -90,7 +90,7 @@
view_mode:,
heading: t("saml.providers.label_configuration_details"),
description: t("saml.providers.section_texts.configuration"),
- label: (provider.persisted? && !provider.configured?) ? t(:label_incomplete) : nil,
+ label: provider.persisted? && !provider.configured? ? t(:label_incomplete) : nil,
)
)
end
diff --git a/modules/budgets/app/views/budgets/_list.html.erb b/modules/budgets/app/views/budgets/_list.html.erb
index 68d449d2846..6b68a2e720d 100644
--- a/modules/budgets/app/views/budgets/_list.html.erb
+++ b/modules/budgets/app/views/budgets/_list.html.erb
@@ -83,7 +83,10 @@ See COPYRIGHT and LICENSE files for more details.
- <% total_budget = BigDecimal(0); labor_budget = BigDecimal(0); material_budget = BigDecimal(0); spent = BigDecimal(0) %>
+ <% total_budget = BigDecimal(0)
+ labor_budget = BigDecimal(0)
+ material_budget = BigDecimal(0)
+ spent = BigDecimal(0) %>
<% budgets.each do |budget| %>
| <%= link_to budget.id, budget_path(budget.id) %> |
@@ -91,7 +94,7 @@ See COPYRIGHT and LICENSE files for more details.
<%= content_tag(:td, number_to_currency(budget.budget, precision: 0), class: "currency") %>
<%= content_tag(:td, number_to_currency(budget.spent, precision: 0), class: "currency") %>
<%= content_tag(:td, number_to_currency(budget.budget - budget.spent, precision: 0), class: "currency") %>
- <%= content_tag(:td, extended_progress_bar(budget.budget_ratio, legend: "#{budget.budget_ratio}")) %>
+ <%= content_tag(:td, extended_progress_bar(budget.budget_ratio, legend: budget.budget_ratio.to_s)) %>
<%-
total_budget += budget.budget
labor_budget += budget.labor_budget
diff --git a/modules/costs/app/views/costlog/edit.html.erb b/modules/costs/app/views/costlog/edit.html.erb
index 4c548797fb3..55af432b0d7 100644
--- a/modules/costs/app/views/costlog/edit.html.erb
+++ b/modules/costs/app/views/costlog/edit.html.erb
@@ -56,7 +56,7 @@ See COPYRIGHT and LICENSE files for more details.
<% if @cost_entry.work_package %>
- <%= h("#{@cost_entry.work_package}") %>
+ <%= h(@cost_entry.work_package.to_s) %>
<% end %>
diff --git a/modules/costs/app/views/hourly_rates/edit.html.erb b/modules/costs/app/views/hourly_rates/edit.html.erb
index 6f5ee402c24..076b6f70694 100644
--- a/modules/costs/app/views/hourly_rates/edit.html.erb
+++ b/modules/costs/app/views/hourly_rates/edit.html.erb
@@ -42,7 +42,7 @@ See COPYRIGHT and LICENSE files for more details.
render Primer::OpenProject::PageHeader.new do |header|
header.with_title { t(:caption_default_rate_history_for, user: @user.name) }
header.with_breadcrumbs(
- [*(breadcrumb_items),
+ [*breadcrumb_items,
t(:caption_default_rate_history_for, user: @user.name)]
)
end
diff --git a/modules/costs/app/views/hourly_rates/show.html.erb b/modules/costs/app/views/hourly_rates/show.html.erb
index 2bb9712dbfc..2f8816bbffa 100644
--- a/modules/costs/app/views/hourly_rates/show.html.erb
+++ b/modules/costs/app/views/hourly_rates/show.html.erb
@@ -42,7 +42,7 @@ See COPYRIGHT and LICENSE files for more details.
render Primer::OpenProject::PageHeader.new do |header|
header.with_title { t(:caption_default_rate_history_for, user: @user.name) }
header.with_breadcrumbs(
- [*(breadcrumb_items),
+ [*breadcrumb_items,
t(:caption_default_rate_history_for, user: @user.name)]
)
end
diff --git a/modules/meeting/app/views/meeting_contents/_show.html.erb b/modules/meeting/app/views/meeting_contents/_show.html.erb
index 534d4fe337c..36a229c7fc3 100644
--- a/modules/meeting/app/views/meeting_contents/_show.html.erb
+++ b/modules/meeting/app/views/meeting_contents/_show.html.erb
@@ -29,7 +29,7 @@ See COPYRIGHT and LICENSE files for more details.
<%
tab ||= locals[:tab_contents] if defined? locals
- if tab && tab.present?
+ if tab.present?
content = tab[:content]
content_type = tab[:content_type]
end
diff --git a/modules/webhooks/app/views/webhooks/outgoing/admin/show.html.erb b/modules/webhooks/app/views/webhooks/outgoing/admin/show.html.erb
index f46aeef5712..cd51ce1b296 100644
--- a/modules/webhooks/app/views/webhooks/outgoing/admin/show.html.erb
+++ b/modules/webhooks/app/views/webhooks/outgoing/admin/show.html.erb
@@ -23,7 +23,7 @@
component.with_attribute(
key: ::Webhooks::Webhook.human_attribute_name("events"),
value: if @webhook.all_projects?
- (t(:label_all))
+ t(:label_all)
else
@webhook.projects.join(", ")
end