diff --git a/.rubocop.yml b/.rubocop.yml index 4315154ae..982341268 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -18,6 +18,9 @@ Bundler/OrderedGems: Enabled: true ConsiderPunctuation: true +Layout/ArgumentAlignment: + Enabled: true + Layout/ArrayAlignment: Enabled: true diff --git a/app/components/admin/budget_headings/form_component.html.erb b/app/components/admin/budget_headings/form_component.html.erb index af488f177..f41f0d14b 100644 --- a/app/components/admin/budget_headings/form_component.html.erb +++ b/app/components/admin/budget_headings/form_component.html.erb @@ -20,20 +20,20 @@ <% if feature?(:map) %> <%= f.select :geozone_id, - geozone_options, - include_blank: t("geozones.none"), - hint: t("admin.budget_headings.form.geozone_info") %> + geozone_options, + include_blank: t("geozones.none"), + hint: t("admin.budget_headings.form.geozone_info") %> <% end %> <% if heading.budget.approval_voting? %> <%= f.number_field :max_ballot_lines, - hint: t("admin.budget_headings.form.max_ballot_lines_info") %> + hint: t("admin.budget_headings.form.max_ballot_lines_info") %> <% end %> <%= f.text_field :population, - maxlength: 8, - data: { toggle_focus: "population-info" }, - hint: t("admin.budget_headings.form.population_info") %> + maxlength: 8, + data: { toggle_focus: "population-info" }, + hint: t("admin.budget_headings.form.population_info") %> <%= f.text_field :latitude, maxlength: 22 %> <%= f.text_field :longitude, maxlength: 22 %> diff --git a/app/components/admin/budget_phases/form_component.html.erb b/app/components/admin/budget_phases/form_component.html.erb index dc0ed15ea..369373454 100644 --- a/app/components/admin/budget_phases/form_component.html.erb +++ b/app/components/admin/budget_phases/form_component.html.erb @@ -39,9 +39,9 @@
<%= translations_form.text_area :description, - maxlength: Budget::Phase::DESCRIPTION_MAX_LENGTH, - class: "html-area", - hint: t("admin.budget_phases.edit.description_help_text") %> + maxlength: Budget::Phase::DESCRIPTION_MAX_LENGTH, + class: "html-area", + hint: t("admin.budget_phases.edit.description_help_text") %>
diff --git a/app/components/admin/budget_phases/phases_component.html.erb b/app/components/admin/budget_phases/phases_component.html.erb index 3d68ac7e4..6205390a4 100644 --- a/app/components/admin/budget_phases/phases_component.html.erb +++ b/app/components/admin/budget_phases/phases_component.html.erb @@ -29,7 +29,8 @@ <%= enabled_cell(phase) %> - <%= render Admin::TableActionsComponent.new(phase, + <%= render Admin::TableActionsComponent.new( + phase, actions: [:edit], edit_path: edit_path(phase) ) %> diff --git a/app/components/admin/budgets/form_component.html.erb b/app/components/admin/budgets/form_component.html.erb index dd9bbddc9..38cc4e6f6 100644 --- a/app/components/admin/budgets/form_component.html.erb +++ b/app/components/admin/budgets/form_component.html.erb @@ -10,8 +10,8 @@
<%= translations_form.text_field :name, - maxlength: Budget.title_max_length, - hint: t("admin.budgets.edit.name_description") %> + maxlength: Budget.title_max_length, + hint: t("admin.budgets.edit.name_description") %>
@@ -67,9 +67,9 @@ <% %w[administrators valuators].each do |staff| %>
<%= link_to t("admin.budgets.edit.#{staff}", count: budget.send(staff).count), - "#", - class: "button expanded hollow js-budget-show-#{staff}-list js-budget-show-users-list", - data: { toggle: "#{staff}_list", texts: t("admin.budgets.edit.#{staff}") } %> + "#", + class: "button expanded hollow js-budget-show-#{staff}-list js-budget-show-users-list", + data: { toggle: "#{staff}_list", texts: t("admin.budgets.edit.#{staff}") } %>
<% end %> diff --git a/app/components/admin/machine_learning/show_component.html.erb b/app/components/admin/machine_learning/show_component.html.erb index 79dc8760c..48482bd3d 100644 --- a/app/components/admin/machine_learning/show_component.html.erb +++ b/app/components/admin/machine_learning/show_component.html.erb @@ -32,8 +32,8 @@

<%= sanitize(t("admin.machine_learning.feature_disabled", - link: link_to(t("admin.machine_learning.feature_disabled_link"), - admin_settings_path(anchor: "tab-feature-flags")))) %> + link: link_to(t("admin.machine_learning.feature_disabled_link"), + admin_settings_path(anchor: "tab-feature-flags")))) %>

<% end %> diff --git a/app/components/admin/poll/officers/officers_component.html.erb b/app/components/admin/poll/officers/officers_component.html.erb index 54784ebaf..d31d85f9a 100644 --- a/app/components/admin/poll/officers/officers_component.html.erb +++ b/app/components/admin/poll/officers/officers_component.html.erb @@ -17,7 +17,8 @@ <% if officer.persisted? %> - <%= render Admin::TableActionsComponent.new(officer, + <%= render Admin::TableActionsComponent.new( + officer, actions: [:destroy], destroy_text: t("admin.poll_officers.officer.delete"), destroy_options: { class: "destroy-officer-link" } diff --git a/app/components/admin/poll/questions/form_component.html.erb b/app/components/admin/poll/questions/form_component.html.erb index bd72edd40..e8dd29a77 100644 --- a/app/components/admin/poll/questions/form_component.html.erb +++ b/app/components/admin/poll/questions/form_component.html.erb @@ -13,9 +13,9 @@ <% else %>
<%= f.select :poll_id, - options_for_select(select_options), - prompt: t("admin.questions.index.select_poll"), - hint: t("admin.questions.form.poll_help") %> + options_for_select(select_options), + prompt: t("admin.questions.index.select_poll"), + hint: t("admin.questions.form.poll_help") %>
<% end %>
diff --git a/app/components/admin/roles/table_actions_component.html.erb b/app/components/admin/roles/table_actions_component.html.erb index 305c18ed4..d5d2deada 100644 --- a/app/components/admin/roles/table_actions_component.html.erb +++ b/app/components/admin/roles/table_actions_component.html.erb @@ -1,5 +1,6 @@ <% if already_has_role? %> - <%= render Admin::TableActionsComponent.new(record, + <%= render Admin::TableActionsComponent.new( + record, actions: actions, destroy_options: { class: "destroy-role-link" } ) %> diff --git a/app/components/attachable/fields_component.rb b/app/components/attachable/fields_component.rb index ae217456a..d26340d70 100644 --- a/app/components/attachable/fields_component.rb +++ b/app/components/attachable/fields_component.rb @@ -46,10 +46,10 @@ class Attachable::FieldsComponent < ApplicationComponent def file_field klass = attachable.persisted? || attachable.cached_attachment.present? ? " hide" : "" f.file_field :attachment, - label_options: { class: "button hollow #{klass}" }, - accept: accepted_content_types_extensions, - class: "js-#{singular_name}-attachment", - data: { url: direct_upload_path } + label_options: { class: "button hollow #{klass}" }, + accept: accepted_content_types_extensions, + class: "js-#{singular_name}-attachment", + data: { url: direct_upload_path } end def direct_upload_path diff --git a/app/components/budgets/executions/filters_component.html.erb b/app/components/budgets/executions/filters_component.html.erb index eed52e564..83d4c13cc 100644 --- a/app/components/budgets/executions/filters_component.html.erb +++ b/app/components/budgets/executions/filters_component.html.erb @@ -2,21 +2,22 @@
<%= label_tag :milestone_tag, t("budgets.executions.filters.milestone_tag.label") %> <%= select_tag :milestone_tag, - options_for_select( - options_for_milestone_tags, - params[:milestone_tag] - ), - prompt: t("budgets.executions.filters.milestone_tag.all", - count: budget.investments.winners.with_milestones.count) %> + options_for_select( + options_for_milestone_tags, + params[:milestone_tag] + ), + prompt: t("budgets.executions.filters.milestone_tag.all", + count: budget.investments.winners.with_milestones.count) %>
<%= label_tag :status, t("budgets.executions.filters.status.label") %> <%= select_tag :status, - options_from_collection_for_select(statuses, - :id, lambda { |s| "#{s.name} (#{filters_select_counts(s.id)})" }, - params[:status]), - prompt: t("budgets.executions.filters.status.all", - count: budget.investments.winners.with_milestones.count) %> + options_from_collection_for_select(statuses, + :id, + lambda { |s| "#{s.name} (#{filters_select_counts(s.id)})" }, + params[:status]), + prompt: t("budgets.executions.filters.status.all", + count: budget.investments.winners.with_milestones.count) %>
<%= submit_tag t("shared.filter") %> diff --git a/app/components/budgets/investments/form_component.html.erb b/app/components/budgets/investments/form_component.html.erb index 0b52328f3..9b28cb0ed 100644 --- a/app/components/budgets/investments/form_component.html.erb +++ b/app/components/budgets/investments/form_component.html.erb @@ -18,15 +18,15 @@ <%= f.translatable_fields do |translations_form| %>
<%= translations_form.text_field :title, - maxlength: Budget::Investment.title_max_length, - data: suggest_data(investment) %> + maxlength: Budget::Investment.title_max_length, + data: suggest_data(investment) %>
<%= translations_form.text_area :description, - maxlength: Budget::Investment.description_max_length, - class: "html-area" %> + maxlength: Budget::Investment.description_max_length, + class: "html-area" %>
<% end %> @@ -94,11 +94,11 @@ <% unless current_user.manager? || investment.persisted? %>
<%= f.check_box :terms_of_service, - title: t("form.accept_terms_title"), - label: t("form.accept_terms", - policy: link_to(t("form.policy"), "/privacy", target: "blank"), - conditions: link_to(t("form.conditions"), "/conditions", target: "blank") - ) %> + title: t("form.accept_terms_title"), + label: t("form.accept_terms", + policy: link_to(t("form.policy"), "/privacy", target: "blank"), + conditions: link_to(t("form.conditions"), "/conditions", target: "blank") + ) %>
<% end %> diff --git a/app/components/budgets/investments/my_ballot_component.html.erb b/app/components/budgets/investments/my_ballot_component.html.erb index e44105a26..bf141f63e 100644 --- a/app/components/budgets/investments/my_ballot_component.html.erb +++ b/app/components/budgets/investments/my_ballot_component.html.erb @@ -10,13 +10,12 @@ <% elsif assigned_heading.present? %>

<%= sanitize(t("budgets.investments.index.sidebar.different_heading_assigned", - heading_link: heading_link(assigned_heading, budget) - )) %> + heading_link: heading_link(assigned_heading, budget))) %>
<%= sanitize(t("budgets.investments.index.sidebar.change_ballot", - check_ballot: link_to(t("budgets.investments.index.sidebar.check_ballot_link"), - budget_ballot_path(budget)))) %> + check_ballot: link_to(t("budgets.investments.index.sidebar.check_ballot_link"), + budget_ballot_path(budget)))) %>

<% else %> @@ -26,7 +25,7 @@

<%= sanitize(ballot.change_vote_info( link: link_to(t("budgets.investments.index.sidebar.change_vote_link"), - budget_ballot_path(budget)))) %> + budget_ballot_path(budget)))) %>

<%= link_to t("budgets.investments.header.check_ballot"), - budget_ballot_path(budget), - class: "button hollow expanded" %> + budget_ballot_path(budget), + class: "button hollow expanded" %>
diff --git a/app/components/budgets/investments/votes_component.html.erb b/app/components/budgets/investments/votes_component.html.erb index 89612f4b6..015e520c9 100644 --- a/app/components/budgets/investments/votes_component.html.erb +++ b/app/components/budgets/investments/votes_component.html.erb @@ -13,22 +13,22 @@
<% if feature?(:remove_investments_supports) %> <%= button_to remove_support_path, - class: "button button-remove-support expanded", - method: "delete", - remote: true, - "aria-label": remove_support_aria_label do %> + class: "button button-remove-support expanded", + method: "delete", + remote: true, + "aria-label": remove_support_aria_label do %> <%= t("budgets.investments.votes.remove_support") %> <% end %> <% end %> <% else %> <%= button_to t("budgets.investments.votes.support"), support_path, - class: "button button-support expanded", - title: t("budgets.investments.investment.support_title"), - method: "post", - remote: !display_support_alert?, - data: ({ confirm: confirm_vote_message } if display_support_alert?), - "aria-label": support_aria_label %> + class: "button button-support expanded", + title: t("budgets.investments.investment.support_title"), + method: "post", + remote: !display_support_alert?, + data: ({ confirm: confirm_vote_message } if display_support_alert?), + "aria-label": support_aria_label %> <% end %> <% end %> @@ -38,11 +38,11 @@ <% if user_voted_for? && setting["twitter_handle"] %>
<%= render "shared/social_share", - title: investment.title, - image_url: image_absolute_url(investment.image, :thumb), - url: budget_investment_url(investment.budget, investment), - description: investment.title, - mobile: investment.title %> + title: investment.title, + image_url: image_absolute_url(investment.image, :thumb), + url: budget_investment_url(investment.budget, investment), + description: investment.title, + mobile: investment.title %>
<% end %> diff --git a/app/components/budgets/subheader_component.html.erb b/app/components/budgets/subheader_component.html.erb index 6e97da27a..82d85686f 100644 --- a/app/components/budgets/subheader_component.html.erb +++ b/app/components/budgets/subheader_component.html.erb @@ -16,13 +16,13 @@ <% else %>
<%= sanitize(t("budgets.investments.index.sidebar.verified_only", - verify: link_to_verify_account)) %> + verify: link_to_verify_account)) %>
<% end %> <% else %>
<%= sanitize(t("budgets.investments.index.sidebar.not_logged_in", - sign_in: link_to_signin, sign_up: link_to_signup)) %> + sign_in: link_to_signin, sign_up: link_to_signup)) %>
<% end %> <% end %> diff --git a/app/components/budgets/supports_info_component.html.erb b/app/components/budgets/supports_info_component.html.erb index 7980b7eb9..2516b1e89 100644 --- a/app/components/budgets/supports_info_component.html.erb +++ b/app/components/budgets/supports_info_component.html.erb @@ -14,7 +14,7 @@

<%= t("budgets.supports_info.time", - phase_end_date: l(budget.current_phase.ends_at.to_date, format: :long)) %>

+ phase_end_date: l(budget.current_phase.ends_at.to_date, format: :long)) %>

<%= t("budgets.supports_info.share") %>

diff --git a/app/components/comments/votes_component.html.erb b/app/components/comments/votes_component.html.erb index b765af80f..9e3deae86 100644 --- a/app/components/comments/votes_component.html.erb +++ b/app/components/comments/votes_component.html.erb @@ -4,9 +4,9 @@ <%= button_to vote_comment_path(comment, value: "yes"), - method: "post", - remote: can?(:vote, comment), - title: t("votes.agree") do %> + method: "post", + remote: can?(:vote, comment), + title: t("votes.agree") do %> <%= t("votes.agree") %> <% end %> <%= comment.total_likes %> @@ -14,9 +14,9 @@ <%= button_to vote_comment_path(comment, value: "no"), - method: "post", - remote: can?(:vote, comment), - title: t("votes.disagree") do %> + method: "post", + remote: can?(:vote, comment), + title: t("votes.disagree") do %> <%= t("votes.disagree") %> <% end %> <%= comment.total_dislikes %> diff --git a/app/components/debates/form_component.html.erb b/app/components/debates/form_component.html.erb index 42aa1d38f..3733960cd 100644 --- a/app/components/debates/form_component.html.erb +++ b/app/components/debates/form_component.html.erb @@ -9,15 +9,15 @@ <%= f.translatable_fields do |translations_form| %>
<%= translations_form.text_field :title, - maxlength: Debate.title_max_length, - data: suggest_data(debate) %> + maxlength: Debate.title_max_length, + data: suggest_data(debate) %>
<%= translations_form.text_area :description, - maxlength: Debate.description_max_length, - class: "html-area" %> + maxlength: Debate.description_max_length, + class: "html-area" %>
<% end %> @@ -42,11 +42,11 @@ <% if debate.new_record? %>
<%= f.check_box :terms_of_service, - title: t("form.accept_terms_title"), - label: t("form.accept_terms", - policy: link_to(t("form.policy"), "/privacy", target: "blank"), - conditions: link_to(t("form.conditions"), "/conditions", target: "blank") - ) %> + title: t("form.accept_terms_title"), + label: t("form.accept_terms", + policy: link_to(t("form.policy"), "/privacy", target: "blank"), + conditions: link_to(t("form.conditions"), "/conditions", target: "blank") + ) %>
<% end %> diff --git a/app/components/layout/footer_component.html.erb b/app/components/layout/footer_component.html.erb index 1dea274fc..979ecc556 100644 --- a/app/components/layout/footer_component.html.erb +++ b/app/components/layout/footer_component.html.erb @@ -7,8 +7,8 @@

<%= sanitize(t("layouts.footer.description", - open_source: link_to(t("layouts.footer.open_source"), t("layouts.footer.open_source_url"), target: "blank", rel: "nofollow"), - consul: link_to(t("layouts.footer.consul"), t("layouts.footer.consul_url"), target: "blank", rel: "nofollow"))) %> + open_source: link_to(t("layouts.footer.open_source"), t("layouts.footer.open_source_url"), target: "blank", rel: "nofollow"), + consul: link_to(t("layouts.footer.consul"), t("layouts.footer.consul_url"), target: "blank", rel: "nofollow"))) %>

diff --git a/app/components/layout/login_items_component.html.erb b/app/components/layout/login_items_component.html.erb index b2acca46e..048ef300d 100644 --- a/app/components/layout/login_items_component.html.erb +++ b/app/components/layout/login_items_component.html.erb @@ -1,19 +1,19 @@ <% if user %>
  • <%= layout_menu_link_to t("layouts.header.my_activity_link"), - user_path(user), - controller_name == "users", - rel: "nofollow", - title: t("shared.go_to_page") + - t("layouts.header.my_activity_link") %> + user_path(user), + controller_name == "users", + rel: "nofollow", + title: t("shared.go_to_page") + + t("layouts.header.my_activity_link") %>
  • <%= layout_menu_link_to t("layouts.header.my_account_link"), - account_path, - controller_name == "account", - rel: "nofollow", - title: t("shared.go_to_page") + - t("layouts.header.my_account_link") %> + account_path, + controller_name == "account", + rel: "nofollow", + title: t("shared.go_to_page") + + t("layouts.header.my_account_link") %>
  • <%= link_to t("devise_views.menu.login_items.logout"), diff --git a/app/components/layout/subnavigation_component.html.erb b/app/components/layout/subnavigation_component.html.erb index 4df7ff1d8..d21b926e5 100644 --- a/app/components/layout/subnavigation_component.html.erb +++ b/app/components/layout/subnavigation_component.html.erb @@ -21,9 +21,9 @@ <% if feature?(:polls) %>
  • <%= layout_menu_link_to t("layouts.header.poll_questions"), - polls_path, - controller_name == "polls" || (controller_name == "questions" && controller.class.module_parent == Polls), - accesskey: "3" %> + polls_path, + controller_name == "polls" || (controller_name == "questions" && controller.class.module_parent == Polls), + accesskey: "3" %>
  • <% end %> <% if feature?(:legislation) %> @@ -37,9 +37,9 @@ <% if feature?(:budgets) %>
  • <%= layout_menu_link_to t("layouts.header.budgets"), - budgets_path, - controller_name == "budgets" || controller_name == "investments", - accesskey: "5" %> + budgets_path, + controller_name == "budgets" || controller_name == "investments", + accesskey: "5" %>
  • <% end %> <% if feature?(:sdg) %> diff --git a/app/components/legislation/proposals/votes_component.html.erb b/app/components/legislation/proposals/votes_component.html.erb index 84e1bd29e..630163492 100644 --- a/app/components/legislation/proposals/votes_component.html.erb +++ b/app/components/legislation/proposals/votes_component.html.erb @@ -12,10 +12,10 @@ <% if current_user&.voted_as_when_voted_for(proposal) && setting["twitter_handle"] %> <% end %> diff --git a/app/components/management/budgets/print_investments/table_component.html.erb b/app/components/management/budgets/print_investments/table_component.html.erb index 424ae41b2..16769ec4d 100644 --- a/app/components/management/budgets/print_investments/table_component.html.erb +++ b/app/components/management/budgets/print_investments/table_component.html.erb @@ -13,7 +13,7 @@ <%= budget.current_phase.name %> <%= link_to t("management.budgets.print_investments"), - print_management_budget_investments_path(budget) %> + print_management_budget_investments_path(budget) %> <% end %> diff --git a/app/components/proposals/form_component.html.erb b/app/components/proposals/form_component.html.erb index 727606511..5a99d7e37 100644 --- a/app/components/proposals/form_component.html.erb +++ b/app/components/proposals/form_component.html.erb @@ -9,8 +9,8 @@ <%= f.translatable_fields do |translations_form| %>
    <%= translations_form.text_field :title, - maxlength: Proposal.title_max_length, - data: suggest_data(proposal) %> + maxlength: Proposal.title_max_length, + data: suggest_data(proposal) %>
    @@ -52,7 +52,7 @@ <% if Geozone.any? %>
    <%= f.select :geozone_id, geozone_select_options, - include_blank: t("geozones.none") %> + include_blank: t("geozones.none") %>
    <% end %> @@ -90,7 +90,7 @@ <% if current_user.unverified? %>
    <%= f.text_field :responsible_name, - hint: t("proposals.form.proposal_responsible_name_note") %> + hint: t("proposals.form.proposal_responsible_name_note") %>
    <% end %> @@ -101,11 +101,11 @@ <% if proposal.new_record? %>
    <%= f.check_box :terms_of_service, - title: t("form.accept_terms_title"), - label: t("form.accept_terms", - policy: link_to(t("form.policy"), "/privacy", target: "blank"), - conditions: link_to(t("form.conditions"), "/conditions", target: "blank") - ) %> + title: t("form.accept_terms_title"), + label: t("form.accept_terms", + policy: link_to(t("form.policy"), "/privacy", target: "blank"), + conditions: link_to(t("form.conditions"), "/conditions", target: "blank") + ) %>
    <% end %> diff --git a/app/components/proposals/votes_component.html.erb b/app/components/proposals/votes_component.html.erb index 7e87fe6ec..c96200e00 100644 --- a/app/components/proposals/votes_component.html.erb +++ b/app/components/proposals/votes_component.html.erb @@ -8,11 +8,11 @@ <% else %> <%= button_to vote_url, - class: "button button-support small expanded", - title: t("proposals.proposal.support_title"), - method: "post", - remote: true, - "aria-label": support_aria_label do %> + class: "button button-support small expanded", + title: t("proposals.proposal.support_title"), + method: "post", + remote: true, + "aria-label": support_aria_label do %> <%= t("proposals.proposal.support") %> <% end %> <% end %> diff --git a/app/components/sdg/related_list_selector_component.html.erb b/app/components/sdg/related_list_selector_component.html.erb index 36fe5a0ba..6e7f5bbf5 100644 --- a/app/components/sdg/related_list_selector_component.html.erb +++ b/app/components/sdg/related_list_selector_component.html.erb @@ -12,15 +12,15 @@ <%= f.text_field :related_sdg_list, - class: "input", - hint: sanitize(t("sdg.related_list_selector.hint", + class: "input", + hint: sanitize(t("sdg.related_list_selector.hint", link: link_to(t("sdg.related_list_selector.help.text"), - sdg_help_path, - title: t("shared.target_blank"), - target: "_blank")), - attributes: %w[href title target]), - data: { "suggestions-list": sdg_related_suggestions, - "remove-tag-text": t("sdg.related_list_selector.remove_tag") } %> + sdg_help_path, + title: t("shared.target_blank"), + target: "_blank")), + attributes: %w[href title target]), + data: { "suggestions-list": sdg_related_suggestions, + "remove-tag-text": t("sdg.related_list_selector.remove_tag") } %>
    diff --git a/app/components/shared/advanced_search_component.html.erb b/app/components/shared/advanced_search_component.html.erb index 8a138f529..0182d5936 100644 --- a/app/components/shared/advanced_search_component.html.erb +++ b/app/components/shared/advanced_search_component.html.erb @@ -15,8 +15,8 @@
    <%= select_tag("advanced_search[date_min]", date_range_options, - include_blank: t("shared.advanced_search.date_range_blank"), - id: "js-advanced-search-date-min") %> + include_blank: t("shared.advanced_search.date_range_blank"), + id: "js-advanced-search-date-min") %>
    <%= text_field_tag "advanced_search[date_max]", - advanced_search[:date_max], - class: "js-calendar" %> + advanced_search[:date_max], + class: "js-calendar" %>
    @@ -43,12 +43,12 @@
    <%= select_tag("advanced_search[goal]", goal_options, - include_blank: t("shared.advanced_search.goal_blank")) %> + include_blank: t("shared.advanced_search.goal_blank")) %>
    <%= select_tag("advanced_search[target]", target_options, - include_blank: t("shared.advanced_search.target_blank")) %> + include_blank: t("shared.advanced_search.target_blank")) %>
    <% end %> diff --git a/app/components/shared/in_favor_against_component.html.erb b/app/components/shared/in_favor_against_component.html.erb index 5d9739052..b78e245f2 100644 --- a/app/components/shared/in_favor_against_component.html.erb +++ b/app/components/shared/in_favor_against_component.html.erb @@ -1,11 +1,11 @@
    <%= button_to polymorphic_path(votable, action: :vote, value: "yes"), - class: "like #{voted_classes[:in_favor]}", - title: t("votes.agree"), - "aria-label": agree_aria_label, - method: "post", - remote: true do %> + class: "like #{voted_classes[:in_favor]}", + title: t("votes.agree"), + "aria-label": agree_aria_label, + method: "post", + remote: true do %> <%= t("votes.agree") %> <% end %> <%= votes_percentage("likes", votable) %> @@ -13,11 +13,11 @@
    <%= button_to polymorphic_path(votable, action: :vote, value: "no"), - class: "unlike #{voted_classes[:against]}", - title: t("votes.disagree"), - "aria-label": disagree_aria_label, - method: "post", - remote: true do %> + class: "unlike #{voted_classes[:against]}", + title: t("votes.disagree"), + "aria-label": disagree_aria_label, + method: "post", + remote: true do %> <%= t("votes.disagree") %> <% end %> <%= votes_percentage("dislikes", votable) %> diff --git a/app/components/shared/map_location_component.rb b/app/components/shared/map_location_component.rb index e82f1f8a1..b4fbca49e 100644 --- a/app/components/shared/map_location_component.rb +++ b/app/components/shared/map_location_component.rb @@ -40,9 +40,9 @@ class Shared::MapLocationComponent < ApplicationComponent def remove_marker button_tag remove_marker_label, - id: remove_marker_id, - class: "map-location-remove-marker", - type: "button" + id: remove_marker_id, + class: "map-location-remove-marker", + type: "button" end def data diff --git a/app/controllers/admin/local_census_records_controller.rb b/app/controllers/admin/local_census_records_controller.rb index a30fc8efc..5c23342f5 100644 --- a/app/controllers/admin/local_census_records_controller.rb +++ b/app/controllers/admin/local_census_records_controller.rb @@ -10,7 +10,7 @@ class Admin::LocalCensusRecordsController < Admin::BaseController @local_census_record = LocalCensusRecord.new(local_census_record_params) if @local_census_record.save redirect_to admin_local_census_records_path, - notice: t("admin.local_census_records.create.notice") + notice: t("admin.local_census_records.create.notice") else render :new end @@ -19,7 +19,7 @@ class Admin::LocalCensusRecordsController < Admin::BaseController def update if @local_census_record.update(local_census_record_params) redirect_to admin_local_census_records_path, - notice: t("admin.local_census_records.update.notice") + notice: t("admin.local_census_records.update.notice") else render :edit end @@ -28,7 +28,7 @@ class Admin::LocalCensusRecordsController < Admin::BaseController def destroy @local_census_record.destroy! redirect_to admin_local_census_records_path, - notice: t("admin.local_census_records.destroy.notice") + notice: t("admin.local_census_records.destroy.notice") end private diff --git a/app/controllers/admin/poll/questions/answers/documents_controller.rb b/app/controllers/admin/poll/questions/answers/documents_controller.rb index 4fce04d05..6eb70dcc8 100644 --- a/app/controllers/admin/poll/questions/answers/documents_controller.rb +++ b/app/controllers/admin/poll/questions/answers/documents_controller.rb @@ -12,7 +12,7 @@ class Admin::Poll::Questions::Answers::DocumentsController < Admin::Poll::BaseCo if @answer.save redirect_to admin_answer_documents_path(@answer), - notice: t("admin.documents.create.success_notice") + notice: t("admin.documents.create.success_notice") else render :index end diff --git a/app/controllers/admin/poll/questions/answers/images_controller.rb b/app/controllers/admin/poll/questions/answers/images_controller.rb index 9b60f3f4c..48b843d72 100644 --- a/app/controllers/admin/poll/questions/answers/images_controller.rb +++ b/app/controllers/admin/poll/questions/answers/images_controller.rb @@ -16,7 +16,7 @@ class Admin::Poll::Questions::Answers::ImagesController < Admin::Poll::BaseContr if @answer.save redirect_to admin_answer_images_path(@answer), - notice: t("flash.actions.create.poll_question_answer_image") + notice: t("flash.actions.create.poll_question_answer_image") else render :new end diff --git a/app/controllers/admin/poll/questions/answers/videos_controller.rb b/app/controllers/admin/poll/questions/answers/videos_controller.rb index c198540b1..ad613fc41 100644 --- a/app/controllers/admin/poll/questions/answers/videos_controller.rb +++ b/app/controllers/admin/poll/questions/answers/videos_controller.rb @@ -11,7 +11,7 @@ class Admin::Poll::Questions::Answers::VideosController < Admin::Poll::BaseContr def create if @video.save redirect_to admin_answer_videos_path(@answer), - notice: t("flash.actions.create.poll_question_answer_video") + notice: t("flash.actions.create.poll_question_answer_video") else render :new end diff --git a/app/controllers/admin/poll/questions/answers_controller.rb b/app/controllers/admin/poll/questions/answers_controller.rb index 844f3d494..874d99a23 100644 --- a/app/controllers/admin/poll/questions/answers_controller.rb +++ b/app/controllers/admin/poll/questions/answers_controller.rb @@ -12,7 +12,7 @@ class Admin::Poll::Questions::AnswersController < Admin::Poll::BaseController def create if @answer.save redirect_to admin_question_path(@question), - notice: t("flash.actions.create.poll_question_answer") + notice: t("flash.actions.create.poll_question_answer") else render :new end @@ -24,7 +24,7 @@ class Admin::Poll::Questions::AnswersController < Admin::Poll::BaseController def update if @answer.update(answer_params) redirect_to admin_question_path(@question), - notice: t("flash.actions.save_changes.notice") + notice: t("flash.actions.save_changes.notice") else render :edit end diff --git a/app/controllers/budgets/investments/votes_controller.rb b/app/controllers/budgets/investments/votes_controller.rb index b48715c5b..29e52a196 100644 --- a/app/controllers/budgets/investments/votes_controller.rb +++ b/app/controllers/budgets/investments/votes_controller.rb @@ -14,7 +14,7 @@ module Budgets respond_to do |format| format.html do redirect_to budget_investments_path(heading_id: @investment.heading.id), - notice: t("flash.actions.create.support") + notice: t("flash.actions.create.support") end format.js { render :show } diff --git a/app/controllers/graphql_controller.rb b/app/controllers/graphql_controller.rb index 877a3a451..0c64ddfb9 100644 --- a/app/controllers/graphql_controller.rb +++ b/app/controllers/graphql_controller.rb @@ -12,7 +12,8 @@ class GraphqlController < ApplicationController begin raise GraphqlController::QueryStringError if query_string.nil? - result = ConsulSchema.execute(query_string, + result = ConsulSchema.execute( + query_string, variables: prepare_variables, context: {}, operation_name: params[:operationName] diff --git a/app/controllers/management/budgets/investments/votes_controller.rb b/app/controllers/management/budgets/investments/votes_controller.rb index 1ab8f8056..c6a013ee6 100644 --- a/app/controllers/management/budgets/investments/votes_controller.rb +++ b/app/controllers/management/budgets/investments/votes_controller.rb @@ -9,7 +9,7 @@ class Management::Budgets::Investments::VotesController < Management::BaseContro respond_to do |format| format.html do redirect_to management_budget_investments_path(heading_id: @investment.heading.id), - notice: t("flash.actions.create.support") + notice: t("flash.actions.create.support") end format.js { render :show } diff --git a/app/helpers/links_helper.rb b/app/helpers/links_helper.rb index 89321462e..0671e9c78 100644 --- a/app/helpers/links_helper.rb +++ b/app/helpers/links_helper.rb @@ -2,7 +2,7 @@ module LinksHelper def render_destroy_element_link(builder, element) link_to_remove_association element.new_record? ? t("links.form.cancel_button") : t("links.form.delete_button"), - builder, class: "delete remove-element" + builder, class: "delete remove-element" end def link_to_signin(options = {}) diff --git a/app/helpers/proposals_dashboard_helper.rb b/app/helpers/proposals_dashboard_helper.rb index d090ca21c..3b069cd02 100644 --- a/app/helpers/proposals_dashboard_helper.rb +++ b/app/helpers/proposals_dashboard_helper.rb @@ -60,10 +60,10 @@ module ProposalsDashboardHelper label = [] label << t("dashboard.resource.required_days", - days: resource.day_offset) if resource.day_offset > 0 + days: resource.day_offset) if resource.day_offset > 0 label << t("dashboard.resource.required_supports", - supports: number_with_delimiter(resource.required_supports, - delimiter: ".")) if resource.required_supports > 0 + supports: number_with_delimiter(resource.required_supports, + delimiter: ".")) if resource.required_supports > 0 safe_join label, h(" #{t("dashboard.resource.and")})") + tag(:br) end diff --git a/app/models/abilities/administrator.rb b/app/models/abilities/administrator.rb index f874af58b..234d3c88b 100644 --- a/app/models/abilities/administrator.rb +++ b/app/models/abilities/administrator.rb @@ -73,7 +73,7 @@ module Abilities can [:hide, :admin_update, :toggle_selection], Budget::Investment can [:valuate, :comment_valuation], Budget::Investment cannot [:admin_update, :toggle_selection, :valuate, :comment_valuation], - Budget::Investment, budget: { phase: "finished" } + Budget::Investment, budget: { phase: "finished" } can :create, Budget::ValuatorAssignment diff --git a/app/models/abilities/common.rb b/app/models/abilities/common.rb index 6c8d6cdd2..2a1432354 100644 --- a/app/models/abilities/common.rb +++ b/app/models/abilities/common.rb @@ -96,9 +96,9 @@ module Abilities can :suggest, Budget::Investment, budget: { phase: "accepting" } can :destroy, Budget::Investment, budget: { phase: ["accepting", "reviewing"] }, author_id: user.id can [:create, :destroy], ActsAsVotable::Vote, - voter_id: user.id, - votable_type: "Budget::Investment", - votable: { budget: { phase: "selecting" }} + voter_id: user.id, + votable_type: "Budget::Investment", + votable: { budget: { phase: "selecting" }} can [:show, :create], Budget::Ballot, budget: { phase: "balloting" } can [:create, :destroy], Budget::Ballot::Line, budget: { phase: "balloting" } diff --git a/app/models/budget/investment.rb b/app/models/budget/investment.rb index f19335baa..34c2ec2eb 100644 --- a/app/models/budget/investment.rb +++ b/app/models/budget/investment.rb @@ -51,9 +51,9 @@ class Budget has_many :comments, -> { where(valuation: false) }, as: :commentable, inverse_of: :commentable has_one :summary_comment, as: :commentable, class_name: "MlSummaryComment", dependent: :destroy has_many :valuations, -> { where(valuation: true) }, - as: :commentable, - inverse_of: :commentable, - class_name: "Comment" + as: :commentable, + inverse_of: :commentable, + class_name: "Comment" validates_translation :title, presence: true, length: { in: 4..Budget::Investment.title_max_length } validates_translation :description, presence: true, length: { maximum: Budget::Investment.description_max_length } diff --git a/app/models/budget/voting_styles/base.rb b/app/models/budget/voting_styles/base.rb index 86a4b0284..97b220bdd 100644 --- a/app/models/budget/voting_styles/base.rb +++ b/app/models/budget/voting_styles/base.rb @@ -27,8 +27,8 @@ class Budget::VotingStyles::Base def voted_info(heading) I18n.t("budgets.investments.index.sidebar.voted_info.#{name}", - count: investments(heading).count, - amount_spent: budget.formatted_amount(investments_price(heading))) + count: investments(heading).count, + amount_spent: budget.formatted_amount(investments_price(heading))) end def amount_available_info(heading) diff --git a/app/models/concerns/attachable.rb b/app/models/concerns/attachable.rb index 87bd92363..b2bcbf1b4 100644 --- a/app/models/concerns/attachable.rb +++ b/app/models/concerns/attachable.rb @@ -6,25 +6,25 @@ module Attachable attr_accessor :cached_attachment validates :attachment, - presence: true, - file_content_type: { - allow: ->(record) { record.accepted_content_types }, - if: -> { association_class && attachment.attached? }, - message: ->(record, *) do - I18n.t("#{record.model_name.plural}.errors.messages.wrong_content_type", - content_type: record.attachment_content_type, - accepted_content_types: record.class.humanized_accepted_content_types) - end - }, - file_size: { - less_than_or_equal_to: ->(record) { record.max_file_size.megabytes }, - if: -> { association_class && attachment.attached? }, - message: ->(record, *) do - I18n.t("#{record.model_name.plural}.errors.messages.in_between", - min: "0 Bytes", - max: "#{record.max_file_size} MB") - end - } + presence: true, + file_content_type: { + allow: ->(record) { record.accepted_content_types }, + if: -> { association_class && attachment.attached? }, + message: ->(record, *) do + I18n.t("#{record.model_name.plural}.errors.messages.wrong_content_type", + content_type: record.attachment_content_type, + accepted_content_types: record.class.humanized_accepted_content_types) + end + }, + file_size: { + less_than_or_equal_to: ->(record) { record.max_file_size.megabytes }, + if: -> { association_class && attachment.attached? }, + message: ->(record, *) do + I18n.t("#{record.model_name.plural}.errors.messages.in_between", + min: "0 Bytes", + max: "#{record.max_file_size} MB") + end + } before_validation :set_attachment_from_cached_attachment, if: -> { cached_attachment.present? } end diff --git a/app/models/concerns/relationable.rb b/app/models/concerns/relationable.rb index ea73185d7..0d3085117 100644 --- a/app/models/concerns/relationable.rb +++ b/app/models/concerns/relationable.rb @@ -3,9 +3,9 @@ module Relationable included do has_many :related_contents, - as: :parent_relationable, - inverse_of: :parent_relationable, - dependent: :destroy + as: :parent_relationable, + inverse_of: :parent_relationable, + dependent: :destroy end def find_related_content(relationable) diff --git a/app/models/legislation/draft_version.rb b/app/models/legislation/draft_version.rb index a3a7f351a..9b21ae923 100644 --- a/app/models/legislation/draft_version.rb +++ b/app/models/legislation/draft_version.rb @@ -11,9 +11,9 @@ class Legislation::DraftVersion < ApplicationRecord belongs_to :process, foreign_key: "legislation_process_id", inverse_of: :draft_versions has_many :annotations, - foreign_key: "legislation_draft_version_id", - inverse_of: :draft_version, - dependent: :destroy + foreign_key: "legislation_draft_version_id", + inverse_of: :draft_version, + dependent: :destroy validates_translation :title, presence: true validates_translation :body, presence: true diff --git a/app/models/legislation/process.rb b/app/models/legislation/process.rb index 4e42b9a5d..48c41a894 100644 --- a/app/models/legislation/process.rb +++ b/app/models/legislation/process.rb @@ -27,21 +27,21 @@ class Legislation::Process < ApplicationRecord CSS_HEX_COLOR = /\A#?(?:[A-F0-9]{3}){1,2}\z/i has_many :draft_versions, -> { order(:id) }, - foreign_key: "legislation_process_id", - inverse_of: :process, - dependent: :destroy + foreign_key: "legislation_process_id", + inverse_of: :process, + dependent: :destroy has_one :final_draft_version, -> { where final_version: true, status: "published" }, - class_name: "Legislation::DraftVersion", - foreign_key: "legislation_process_id", - inverse_of: :process + class_name: "Legislation::DraftVersion", + foreign_key: "legislation_process_id", + inverse_of: :process has_many :questions, -> { order(:id) }, - foreign_key: "legislation_process_id", - inverse_of: :process, - dependent: :destroy + foreign_key: "legislation_process_id", + inverse_of: :process, + dependent: :destroy has_many :proposals, -> { order(:id) }, - foreign_key: "legislation_process_id", - inverse_of: :process, - dependent: :destroy + foreign_key: "legislation_process_id", + inverse_of: :process, + dependent: :destroy validates_translation :title, presence: true validates :start_date, presence: true diff --git a/app/models/poll.rb b/app/models/poll.rb index 8317ca3f0..c4eef8d39 100644 --- a/app/models/poll.rb +++ b/app/models/poll.rb @@ -62,9 +62,11 @@ class Poll < ApplicationRecord end def self.overlaping_with(poll) - where("? < ends_at and ? >= starts_at", poll.starts_at.beginning_of_day, - poll.ends_at.end_of_day).where.not(id: poll.id) - .where(related: poll.related) + where("? < ends_at and ? >= starts_at", + poll.starts_at.beginning_of_day, + poll.ends_at.end_of_day) + .where.not(id: poll.id) + .where(related: poll.related) end def title diff --git a/app/models/poll/question.rb b/app/models/poll/question.rb index 531972f4d..9e043d499 100644 --- a/app/models/poll/question.rb +++ b/app/models/poll/question.rb @@ -15,9 +15,9 @@ class Poll::Question < ApplicationRecord has_many :comments, as: :commentable, inverse_of: :commentable has_many :answers, class_name: "Poll::Answer" has_many :question_answers, -> { order "given_order asc" }, - class_name: "Poll::Question::Answer", - inverse_of: :question, - dependent: :destroy + class_name: "Poll::Question::Answer", + inverse_of: :question, + dependent: :destroy has_many :partial_results belongs_to :proposal diff --git a/app/models/tenant.rb b/app/models/tenant.rb index 5af5af632..36d28b141 100644 --- a/app/models/tenant.rb +++ b/app/models/tenant.rb @@ -2,10 +2,10 @@ class Tenant < ApplicationRecord enum schema_type: %w[subdomain domain] validates :schema, - presence: true, - uniqueness: true, - exclusion: { in: ->(*) { excluded_subdomains }}, - format: { with: URI::DEFAULT_PARSER.regexp[:HOST] } + presence: true, + uniqueness: true, + exclusion: { in: ->(*) { excluded_subdomains }}, + format: { with: URI::DEFAULT_PARSER.regexp[:HOST] } validates :name, presence: true, uniqueness: true after_create :create_schema diff --git a/app/models/user.rb b/app/models/user.rb index 12a78b13c..881ace74e 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -26,55 +26,55 @@ class User < ApplicationRecord has_many :proposals, -> { with_hidden }, foreign_key: :author_id, inverse_of: :author has_many :activities has_many :budget_investments, -> { with_hidden }, - class_name: "Budget::Investment", - foreign_key: :author_id, - inverse_of: :author + class_name: "Budget::Investment", + foreign_key: :author_id, + inverse_of: :author has_many :comments, -> { with_hidden }, inverse_of: :user has_many :failed_census_calls has_many :notifications has_many :direct_messages_sent, - class_name: "DirectMessage", - foreign_key: :sender_id, - inverse_of: :sender + class_name: "DirectMessage", + foreign_key: :sender_id, + inverse_of: :sender has_many :direct_messages_received, - class_name: "DirectMessage", - foreign_key: :receiver_id, - inverse_of: :receiver + class_name: "DirectMessage", + foreign_key: :receiver_id, + inverse_of: :receiver has_many :legislation_answers, class_name: "Legislation::Answer", dependent: :destroy, inverse_of: :user has_many :follows has_many :legislation_annotations, - class_name: "Legislation::Annotation", - foreign_key: :author_id, - inverse_of: :author + class_name: "Legislation::Annotation", + foreign_key: :author_id, + inverse_of: :author has_many :legislation_proposals, - class_name: "Legislation::Proposal", - foreign_key: :author_id, - inverse_of: :author + class_name: "Legislation::Proposal", + foreign_key: :author_id, + inverse_of: :author has_many :legislation_questions, - class_name: "Legislation::Question", - foreign_key: :author_id, - inverse_of: :author + class_name: "Legislation::Question", + foreign_key: :author_id, + inverse_of: :author has_many :polls, foreign_key: :author_id, inverse_of: :author has_many :poll_answers, - class_name: "Poll::Answer", - foreign_key: :author_id, - inverse_of: :author + class_name: "Poll::Answer", + foreign_key: :author_id, + inverse_of: :author has_many :poll_pair_answers, - class_name: "Poll::PairAnswer", - foreign_key: :author_id, - inverse_of: :author + class_name: "Poll::PairAnswer", + foreign_key: :author_id, + inverse_of: :author has_many :poll_partial_results, - class_name: "Poll::PartialResult", - foreign_key: :author_id, - inverse_of: :author + class_name: "Poll::PartialResult", + foreign_key: :author_id, + inverse_of: :author has_many :poll_questions, - class_name: "Poll::Question", - foreign_key: :author_id, - inverse_of: :author + class_name: "Poll::Question", + foreign_key: :author_id, + inverse_of: :author has_many :poll_recounts, - class_name: "Poll::Recount", - foreign_key: :author_id, - inverse_of: :author + class_name: "Poll::Recount", + foreign_key: :author_id, + inverse_of: :author has_many :related_contents, foreign_key: :author_id, inverse_of: :author, dependent: nil has_many :topics, foreign_key: :author_id, inverse_of: :author belongs_to :geozone diff --git a/app/models/verification/management/email.rb b/app/models/verification/management/email.rb index 5348c97ba..fbda50b8f 100644 --- a/app/models/verification/management/email.rb +++ b/app/models/verification/management/email.rb @@ -55,8 +55,8 @@ class Verification::Management::Email if document_number_mismatch? errors.add(:email, I18n.t("management.email_verifications.document_mismatch", - document_type: ApplicationController.helpers.humanize_document_type(user.document_type), - document_number: user.document_number)) + document_type: ApplicationController.helpers.humanize_document_type(user.document_type), + document_number: user.document_number)) end end diff --git a/app/views/admin/admin_notifications/index.html.erb b/app/views/admin/admin_notifications/index.html.erb index c8fbe4900..de8b3f392 100644 --- a/app/views/admin/admin_notifications/index.html.erb +++ b/app/views/admin/admin_notifications/index.html.erb @@ -1,6 +1,7 @@

    <%= t("admin.admin_notifications.index.section_title") %>

    -<%= link_to t("admin.admin_notifications.index.new_notification"), new_admin_admin_notification_path, - class: "button float-right" %> +<%= link_to t("admin.admin_notifications.index.new_notification"), + new_admin_admin_notification_path, + class: "button float-right" %> <% if @admin_notifications.any? %> diff --git a/app/views/admin/banners/_form.html.erb b/app/views/admin/banners/_form.html.erb index 8737b760b..cd82e3f37 100644 --- a/app/views/admin/banners/_form.html.erb +++ b/app/views/admin/banners/_form.html.erb @@ -17,12 +17,12 @@ <%= f.translatable_fields do |translations_form| %>
    <%= translations_form.text_field :title, - data: { js_banner_title: "js_banner_title" } %> + data: { js_banner_title: "js_banner_title" } %>
    <%= translations_form.text_field :description, - data: { js_banner_description: "js_banner_description" } %> + data: { js_banner_description: "js_banner_description" } %>
    <% end %> diff --git a/app/views/admin/banners/index.html.erb b/app/views/admin/banners/index.html.erb index a81d0671d..046e7123d 100644 --- a/app/views/admin/banners/index.html.erb +++ b/app/views/admin/banners/index.html.erb @@ -1,5 +1,6 @@ <%= link_to t("admin.banners.index.create"), - new_admin_banner_path, class: "button float-right" %> + new_admin_banner_path, + class: "button float-right" %>

    <%= t("admin.banners.index.title") %>

    diff --git a/app/views/admin/budget_investments/_filters_description.html.erb b/app/views/admin/budget_investments/_filters_description.html.erb index 5732388f8..0aad814fb 100644 --- a/app/views/admin/budget_investments/_filters_description.html.erb +++ b/app/views/admin/budget_investments/_filters_description.html.erb @@ -1,16 +1,16 @@ <% if params[:filter].present? && params[:advanced_filters].present? %>

    <%= sanitize(t("#{i18n_namespace}.filters.two_filters", - filter: t("#{i18n_namespace}.filters.#{params[:filter]}"), - advanced_filters: budget_investments_advanced_filters(params[:advanced_filters]))) %>

    + filter: t("#{i18n_namespace}.filters.#{params[:filter]}"), + advanced_filters: budget_investments_advanced_filters(params[:advanced_filters]))) %>

    <% elsif params[:filter].present? %>

    <%= sanitize(t("#{i18n_namespace}.filters.one_filter", - filter: t("#{i18n_namespace}.filters.#{params[:filter]}"))) %>

    + filter: t("#{i18n_namespace}.filters.#{params[:filter]}"))) %>

    <% elsif params[:advanced_filters].present? %>

    <%= sanitize(t("#{i18n_namespace}.filters.one_filter", - filter: budget_investments_advanced_filters(params[:advanced_filters]))) %>

    + filter: budget_investments_advanced_filters(params[:advanced_filters]))) %>

    <% end %> diff --git a/app/views/admin/budget_investments/_investments.html.erb b/app/views/admin/budget_investments/_investments.html.erb index e5a79becb..f378fd63a 100644 --- a/app/views/admin/budget_investments/_investments.html.erb +++ b/app/views/admin/budget_investments/_investments.html.erb @@ -9,7 +9,8 @@ <% if @investments.any? %>

    <%= page_entries_info @investments %>

    <%= render "admin/shared/columns_selector", - cookie: "investments-columns", default: %w[id title supports admin valuator geozone feasibility price valuation_finished visible_to_valuators selected incompatible] %> + cookie: "investments-columns", + default: %w[id title supports admin valuator geozone feasibility price valuation_finished visible_to_valuators selected incompatible] %>
    <%= render "filters_description", i18n_namespace: "admin.budget_investments.index" %> diff --git a/app/views/admin/budget_investments/_written_by_author.html.erb b/app/views/admin/budget_investments/_written_by_author.html.erb index 63e48d4b6..c7ecf7ea6 100644 --- a/app/views/admin/budget_investments/_written_by_author.html.erb +++ b/app/views/admin/budget_investments/_written_by_author.html.erb @@ -1,8 +1,8 @@
    <%= t "admin.budget_investments.show.info", - budget_name: @budget.name, - group_name: @investment.group.name, - id: @investment.id %> + budget_name: @budget.name, + group_name: @investment.group.name, + id: @investment.id %>

    diff --git a/app/views/admin/budget_investments/edit.html.erb b/app/views/admin/budget_investments/edit.html.erb index e1bed238b..cd4f2f540 100644 --- a/app/views/admin/budget_investments/edit.html.erb +++ b/app/views/admin/budget_investments/edit.html.erb @@ -18,13 +18,13 @@ <%= f.translatable_fields do |translations_form| %>
    <%= translations_form.text_field :title, - maxlength: Budget::Investment.title_max_length %> + maxlength: Budget::Investment.title_max_length %>
    <%= translations_form.text_area :description, - maxlength: Budget::Investment.description_max_length, - class: "html-area" %> + maxlength: Budget::Investment.description_max_length, + class: "html-area" %>
    <% end %> @@ -52,8 +52,8 @@
    <%= f.select(:administrator_id, - @admins.map { |a| [a.description_or_name_and_email, a.id] }, - { include_blank: t("admin.budget_investments.edit.undefined") }) %> + @admins.map { |a| [a.description_or_name_and_email, a.id] }, + { include_blank: t("admin.budget_investments.edit.undefined") }) %>
    @@ -65,10 +65,10 @@ <% end %> <%= f.text_field :valuation_tag_list, - value: @investment.valuation_tag_list.sort.join(","), - label: false, - placeholder: t("admin.budget_investments.edit.tags_placeholder"), - class: "js-tag-list" %> + value: @investment.valuation_tag_list.sort.join(","), + label: false, + placeholder: t("admin.budget_investments.edit.tags_placeholder"), + class: "js-tag-list" %>
    @@ -96,19 +96,19 @@

    <%= t("admin.budget_investments.edit.compatibility") %>

    <%= f.check_box :incompatible, - title: t("admin.budget_investments.edit.compatibility") %> + title: t("admin.budget_investments.edit.compatibility") %>
    <% end %>

    <%= t("admin.budget_investments.edit.selection") %>

    <%= f.check_box :selected, - title: t("admin.budget_investments.edit.selection") %> + title: t("admin.budget_investments.edit.selection") %>
    <%= f.text_field :milestone_tag_list, - value: @investment.milestone_tag_list.sort.join(", ") %> + value: @investment.milestone_tag_list.sort.join(", ") %>
    diff --git a/app/views/admin/dashboard/actions/_form.html.erb b/app/views/admin/dashboard/actions/_form.html.erb index 151af1c54..d98bd9501 100644 --- a/app/views/admin/dashboard/actions/_form.html.erb +++ b/app/views/admin/dashboard/actions/_form.html.erb @@ -5,8 +5,9 @@ <%= f.label :action_type %> <% ::Dashboard::Action.action_types.keys.each do |action_type_value| %> - <%= f.radio_button :action_type, action_type_value, - data: { toggle: "request_to_administrators short_description" } %> + <%= f.radio_button :action_type, + action_type_value, + data: { toggle: "request_to_administrators short_description" } %> <% end %>
    diff --git a/app/views/admin/dashboard/actions/index.html.erb b/app/views/admin/dashboard/actions/index.html.erb index 38b4cba02..544bd5545 100644 --- a/app/views/admin/dashboard/actions/index.html.erb +++ b/app/views/admin/dashboard/actions/index.html.erb @@ -1,5 +1,6 @@ <%= link_to t("admin.dashboard.actions.index.create"), - new_admin_dashboard_action_path, class: "button success float-right" %> + new_admin_dashboard_action_path, + class: "button success float-right" %>

    <%= t("admin.dashboard.actions.index.title") %> diff --git a/app/views/admin/dashboard/administrator_tasks/index.html.erb b/app/views/admin/dashboard/administrator_tasks/index.html.erb index ff30b6d37..ce2dbf6b9 100644 --- a/app/views/admin/dashboard/administrator_tasks/index.html.erb +++ b/app/views/admin/dashboard/administrator_tasks/index.html.erb @@ -25,7 +25,8 @@

    diff --git a/app/views/admin/newsletters/index.html.erb b/app/views/admin/newsletters/index.html.erb index 46270436b..0830c09d8 100644 --- a/app/views/admin/newsletters/index.html.erb +++ b/app/views/admin/newsletters/index.html.erb @@ -1,6 +1,7 @@

    <%= t("admin.newsletters.index.title") %>

    -<%= link_to t("admin.newsletters.index.new_newsletter"), new_admin_newsletter_path, - class: "button float-right" %> +<%= link_to t("admin.newsletters.index.new_newsletter"), + new_admin_newsletter_path, + class: "button float-right" %> <% if @newsletters.any? %>
    <% unless task.executed_at? %> - <%= render Admin::TableActionsComponent.new(task, + <%= render Admin::TableActionsComponent.new( + task, actions: [:edit], edit_text: t("admin.dashboard.administrator_tasks.index.solve") ) %> diff --git a/app/views/admin/emails_download/index.html.erb b/app/views/admin/emails_download/index.html.erb index 395ff9039..3fd0f2f01 100644 --- a/app/views/admin/emails_download/index.html.erb +++ b/app/views/admin/emails_download/index.html.erb @@ -13,7 +13,7 @@ <%= select_tag :users_segment, options_for_select(user_segments_options) %> <%= submit_tag t("admin.emails_download.index.download_emails_button"), - class: "button", - data: { disable_with: false } %> + class: "button", + data: { disable_with: false } %> <% end %> diff --git a/app/views/admin/legislation/draft_versions/_form.html.erb b/app/views/admin/legislation/draft_versions/_form.html.erb index cb56e5ea2..b3f6286a9 100644 --- a/app/views/admin/legislation/draft_versions/_form.html.erb +++ b/app/views/admin/legislation/draft_versions/_form.html.erb @@ -35,8 +35,8 @@
    <%= sanitize(t("admin.legislation.draft_versions.form.title", - draft_version_title: @draft_version.title, - process_title: @process.title)) %> + draft_version_title: @draft_version.title, + process_title: @process.title)) %>
    diff --git a/app/views/admin/legislation/questions/_form.html.erb b/app/views/admin/legislation/questions/_form.html.erb index d0a0e646d..cdab0e727 100644 --- a/app/views/admin/legislation/questions/_form.html.erb +++ b/app/views/admin/legislation/questions/_form.html.erb @@ -29,7 +29,9 @@
    <%= link_to_add_association t("admin.legislation.questions.form.add_option"), - f, :question_options, class: "button hollow" %> + f, + :question_options, + class: "button hollow" %>
    diff --git a/app/views/admin/local_census_records/imports/show.html.erb b/app/views/admin/local_census_records/imports/show.html.erb index ba66a87f8..da64f5900 100644 --- a/app/views/admin/local_census_records/imports/show.html.erb +++ b/app/views/admin/local_census_records/imports/show.html.erb @@ -9,11 +9,11 @@

    <%= t("admin.local_census_records.imports.show.subtitle") %>

    <%= render "local_census_records", - title: t("admin.local_census_records.imports.show.errored"), - id: "invalid-local-census-records", - local_census_records: @import.invalid_records %> + title: t("admin.local_census_records.imports.show.errored"), + id: "invalid-local-census-records", + local_census_records: @import.invalid_records %> <%= render "local_census_records", - title: t("admin.local_census_records.imports.show.created"), - id: "created-local-census-records", - local_census_records: @import.created_records %> + title: t("admin.local_census_records.imports.show.created"), + id: "created-local-census-records", + local_census_records: @import.created_records %> diff --git a/app/views/admin/milestones/_form.html.erb b/app/views/admin/milestones/_form.html.erb index 23314333f..7198f1c93 100644 --- a/app/views/admin/milestones/_form.html.erb +++ b/app/views/admin/milestones/_form.html.erb @@ -5,9 +5,9 @@
    <%= f.select :status_id, - @statuses.map { |s| [s.name, s.id] }, - { include_blank: @statuses.any? ? "" : t("admin.milestones.form.no_statuses_defined") }, - { disabled: @statuses.blank? } %> + @statuses.map { |s| [s.name, s.id] }, + { include_blank: @statuses.any? ? "" : t("admin.milestones.form.no_statuses_defined") }, + { disabled: @statuses.blank? } %> <%= link_to t("admin.milestones.form.admin_statuses"), admin_milestone_statuses_path %>
    diff --git a/app/views/admin/milestones/_milestones.html.erb b/app/views/admin/milestones/_milestones.html.erb index 43479ce86..46940ab88 100644 --- a/app/views/admin/milestones/_milestones.html.erb +++ b/app/views/admin/milestones/_milestones.html.erb @@ -47,9 +47,9 @@ <% if milestone.documents.present? %> <% milestone.documents.each do |document| %> <%= link_to document.title, - document.attachment, - target: "_blank", - rel: "nofollow" %>
    + document.attachment, + target: "_blank", + rel: "nofollow" %>
    <% end %> <% end %>
    diff --git a/app/views/admin/newsletters/new.html.erb b/app/views/admin/newsletters/new.html.erb index b600bdd89..2c05aed24 100644 --- a/app/views/admin/newsletters/new.html.erb +++ b/app/views/admin/newsletters/new.html.erb @@ -3,8 +3,8 @@

    <%= t("admin.newsletters.new.title") %>

    <%= sanitize(t("admin.newsletters.new.header_footer_help_text", - link: link_to(t("admin.newsletters.new.image_link"), - admin_site_customization_images_path))) %> + link: link_to(t("admin.newsletters.new.image_link"), + admin_site_customization_images_path))) %>

    <%= render "form" %> diff --git a/app/views/admin/poll/booth_assignments/_booth_assignment.html.erb b/app/views/admin/poll/booth_assignments/_booth_assignment.html.erb index 3da870b1f..83a68746f 100644 --- a/app/views/admin/poll/booth_assignments/_booth_assignment.html.erb +++ b/app/views/admin/poll/booth_assignments/_booth_assignment.html.erb @@ -12,7 +12,8 @@ <% end %> diff --git a/app/views/dashboard/polls/_form.html.erb b/app/views/dashboard/polls/_form.html.erb index 6a74ad95c..d39a8070b 100644 --- a/app/views/dashboard/polls/_form.html.erb +++ b/app/views/dashboard/polls/_form.html.erb @@ -8,16 +8,16 @@
    <%= f.text_field :starts_at, - autocomplete: "off", - value: poll.starts_at.present? ? l(poll.starts_at.to_date) : nil, - class: "js-calendar-full" %> + autocomplete: "off", + value: poll.starts_at.present? ? l(poll.starts_at.to_date) : nil, + class: "js-calendar-full" %>
    <%= f.text_field :ends_at, - autocomplete: "off", - value: poll.ends_at.present? ? l(poll.ends_at.to_date) : nil, - class: "js-calendar-full" %> + autocomplete: "off", + value: poll.ends_at.present? ? l(poll.ends_at.to_date) : nil, + class: "js-calendar-full" %>
    diff --git a/app/views/debates/_actions.html.erb b/app/views/debates/_actions.html.erb index 3605d3fcf..d3e64148b 100644 --- a/app/views/debates/_actions.html.erb +++ b/app/views/debates/_actions.html.erb @@ -4,9 +4,15 @@  |  <% if debate.featured? %> <%= link_to t("admin.actions.unmark_featured").capitalize, unmark_featured_debate_path(debate), - method: :put, data: { confirm: t("admin.actions.confirm_action", action: t("admin.actions.unmark_featured"), name: debate.title) } %> + method: :put, + data: { confirm: t("admin.actions.confirm_action", + action: t("admin.actions.unmark_featured"), + name: debate.title) } %> <% else %> <%= link_to t("admin.actions.mark_featured").capitalize, mark_featured_debate_path(debate), - method: :put, data: { confirm: t("admin.actions.confirm_action", action: t("admin.actions.mark_featured"), name: debate.title) } %> + method: :put, + data: { confirm: t("admin.actions.confirm_action", + action: t("admin.actions.mark_featured"), + name: debate.title) } %> <% end %> <% end %> diff --git a/app/views/debates/index.html.erb b/app/views/debates/index.html.erb index 08647fee1..6e51a2b5e 100644 --- a/app/views/debates/index.html.erb +++ b/app/views/debates/index.html.erb @@ -69,7 +69,7 @@

    <%= t("debates.index.section_footer.description") %>

    <%= t("debates.index.section_footer.help_text_1") %>

    <%= sanitize(t("debates.index.section_footer.help_text_2", - org: link_to(setting["org_name"], new_user_registration_path))) %>

    + org: link_to(setting["org_name"], new_user_registration_path))) %>

    <% end %> diff --git a/app/views/debates/show.html.erb b/app/views/debates/show.html.erb index 52f6dd160..52146ee68 100644 --- a/app/views/debates/show.html.erb +++ b/app/views/debates/show.html.erb @@ -60,11 +60,11 @@ <%= render "debates/votes", debate: @debate %> <%= render "shared/social_share", - share_title: t("debates.show.share"), - title: @debate.title, - url: debate_url(@debate), - description: @debate.title, - mobile: @debate.title %> + share_title: t("debates.show.share"), + title: @debate.title, + url: debate_url(@debate), + description: @debate.title, + mobile: @debate.title %> diff --git a/app/views/devise/confirmations/show.html.erb b/app/views/devise/confirmations/show.html.erb index b6c7d5729..4024802a2 100644 --- a/app/views/devise/confirmations/show.html.erb +++ b/app/views/devise/confirmations/show.html.erb @@ -15,12 +15,12 @@
    <%= f.password_field :password, - autofocus: true, - label: t("devise_views.confirmations.show.new_password_label") %> + autofocus: true, + label: t("devise_views.confirmations.show.new_password_label") %>
    <%= f.password_field :password_confirmation, - label: t("devise_views.confirmations.show.new_password_confirmation_label") %> + label: t("devise_views.confirmations.show.new_password_confirmation_label") %>
    diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index 0ed59c5ca..968d64321 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -5,7 +5,7 @@

    <%= sanitize(t("devise_views.shared.links.signup", - signup_link: link_to(t("devise_views.shared.links.signup_link"), new_user_registration_path))) %> + signup_link: link_to(t("devise_views.shared.links.signup_link"), new_user_registration_path))) %>

    <%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %> diff --git a/app/views/direct_messages/new.html.erb b/app/views/direct_messages/new.html.erb index 8c0635a26..1343f6363 100644 --- a/app/views/direct_messages/new.html.erb +++ b/app/views/direct_messages/new.html.erb @@ -10,7 +10,8 @@

    <%= sanitize(t("users.login_to_continue", - signin: link_to_signin, signup: link_to_signup)) %> + signin: link_to_signin, + signup: link_to_signup)) %>

    <% elsif not @receiver.email_on_direct_message? %> @@ -34,7 +35,7 @@

    <%= sanitize(t("users.direct_messages.new.verified_only", - verify_account: link_to_verify_account)) %> + verify_account: link_to_verify_account)) %>

    <% end %> diff --git a/app/views/direct_messages/show.html.erb b/app/views/direct_messages/show.html.erb index 7a3ce847a..7ee6abb87 100644 --- a/app/views/direct_messages/show.html.erb +++ b/app/views/direct_messages/show.html.erb @@ -6,7 +6,7 @@
    <%= t("users.direct_messages.show.receiver", - receiver: @direct_message.receiver.name) %> + receiver: @direct_message.receiver.name) %>

    <%= @direct_message.title %>

    diff --git a/app/views/documents/_document.html.erb b/app/views/documents/_document.html.erb index 5f6b52378..a2a244933 100644 --- a/app/views/documents/_document.html.erb +++ b/app/views/documents/_document.html.erb @@ -15,9 +15,9 @@ <% if can?(:destroy, document) %>
    <%= link_to t("documents.buttons.destroy_document"), - document, - method: :delete, - data: { confirm: t("documents.actions.destroy.confirm") }, - class: "delete" %> + document, + method: :delete, + data: { confirm: t("documents.actions.destroy.confirm") }, + class: "delete" %> <% end %> diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 1f7e0e617..eb84e2688 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -5,9 +5,9 @@ <%= render "layouts/meta_tags" %> <%= content_for :canonical %> <%= favicon_link_tag image_path_for("apple-touch-icon-200.png"), - rel: "icon apple-touch-icon", - sizes: "200x200", - type: "image/png" %> + rel: "icon apple-touch-icon", + sizes: "200x200", + type: "image/png" %> <%= content_for :social_media_meta_tags %> <%= raw setting["html.per_page_code_head"] %> @@ -28,10 +28,14 @@

    <%= t("layouts.application.ie_title") %>

    <%= sanitize(t("layouts.application.ie", - chrome: link_to( - t("layouts.application.chrome"), "https://www.google.com/chrome/browser/desktop/", title: t("shared.target_blank"), target: "_blank"), - firefox: link_to( - t("layouts.application.firefox"), "https://www.mozilla.org/firefox", title: t("shared.target_blank"), target: "_blank") + chrome: link_to(t("layouts.application.chrome"), + "https://www.google.com/chrome/browser/desktop/", + title: t("shared.target_blank"), + target: "_blank"), + firefox: link_to(t("layouts.application.firefox"), + "https://www.mozilla.org/firefox", + title: t("shared.target_blank"), + target: "_blank") )) %>

    diff --git a/app/views/layouts/dashboard.html.erb b/app/views/layouts/dashboard.html.erb index ffdfc9439..77f42bdcc 100644 --- a/app/views/layouts/dashboard.html.erb +++ b/app/views/layouts/dashboard.html.erb @@ -5,9 +5,9 @@ <%= render "layouts/meta_tags" %> <%= content_for :canonical %> <%= favicon_link_tag image_path_for("apple-touch-icon-200.png"), - rel: "icon apple-touch-icon", - sizes: "200x200", - type: "image/png" %> + rel: "icon apple-touch-icon", + sizes: "200x200", + type: "image/png" %> <%= content_for :social_media_meta_tags %> <%= raw setting["per_page_code_head"] %> diff --git a/app/views/legislation/annotations/_comments_box.html.erb b/app/views/legislation/annotations/_comments_box.html.erb index c33429e07..8b06813d9 100644 --- a/app/views/legislation/annotations/_comments_box.html.erb +++ b/app/views/legislation/annotations/_comments_box.html.erb @@ -23,10 +23,10 @@ diff --git a/app/views/legislation/draft_versions/show.html.erb b/app/views/legislation/draft_versions/show.html.erb index f4f1ad0ed..e42bb0920 100644 --- a/app/views/legislation/draft_versions/show.html.erb +++ b/app/views/legislation/draft_versions/show.html.erb @@ -25,7 +25,7 @@ <% end %> <%= t("legislation.draft_versions.show.updated_at", - date: format_date(@draft_version.updated_at)) %> + date: format_date(@draft_version.updated_at)) %> <% unless @draft_version.final_version? %> diff --git a/app/views/legislation/processes/_header.html.erb b/app/views/legislation/processes/_header.html.erb index eb05108a5..0e38798d8 100644 --- a/app/views/legislation/processes/_header.html.erb +++ b/app/views/legislation/processes/_header.html.erb @@ -3,9 +3,10 @@
    <% if banner_color? %> - <%= link_to t("shared.back"), legislation_processes_path, - class: "icon-angle-left", - style: "color:#{process.font_color};" %> + <%= link_to t("shared.back"), + legislation_processes_path, + class: "icon-angle-left", + style: "color:#{process.font_color};" %> <% else %> <%= back_link_to legislation_processes_path %> <% end %> @@ -37,11 +38,11 @@
    <%= render "shared/social_share", - share_title: t("proposals.show.share"), - title: @proposal.title, - url: legislation_process_proposal_url(process_id: @process), - description: @proposal.summary, - mobile: @proposal.title %> + share_title: t("proposals.show.share"), + title: @proposal.title, + url: legislation_process_proposal_url(process_id: @process), + description: @proposal.summary, + mobile: @proposal.title %> diff --git a/app/views/legislation/questions/_participation_not_allowed.html.erb b/app/views/legislation/questions/_participation_not_allowed.html.erb index 4e72372bb..35d6f351c 100644 --- a/app/views/legislation/questions/_participation_not_allowed.html.erb +++ b/app/views/legislation/questions/_participation_not_allowed.html.erb @@ -8,13 +8,14 @@

    <%= sanitize(t("legislation.questions.participation.verified_only", - verify_account: link_to_verify_account)) %> + verify_account: link_to_verify_account)) %>

    <% elsif !user_signed_in? %>
    <%= sanitize(t("legislation.questions.participation.unauthenticated", - signin: link_to_signin, signup: link_to_signup)) %> + signin: link_to_signin, + signup: link_to_signup)) %>
    <% elsif !@process.debate_phase.open? %>
    diff --git a/app/views/mailer/budget_investment_created.html.erb b/app/views/mailer/budget_investment_created.html.erb index 8c2da30c6..12f945b41 100644 --- a/app/views/mailer/budget_investment_created.html.erb +++ b/app/views/mailer/budget_investment_created.html.erb @@ -21,8 +21,9 @@

    <%= sanitize( t("mailers.budget_investment_created.follow", - link: link_to(t("mailers.budget_investment_created.follow_link"), budgets_url, - style: css_for_mailer_link) + link: link_to(t("mailers.budget_investment_created.follow_link"), + budgets_url, + style: css_for_mailer_link) ), attributes: %w[href style] ) %> diff --git a/app/views/mailer/direct_message_for_receiver.html.erb b/app/views/mailer/direct_message_for_receiver.html.erb index efe41e744..33c64f941 100644 --- a/app/views/mailer/direct_message_for_receiver.html.erb +++ b/app/views/mailer/direct_message_for_receiver.html.erb @@ -13,7 +13,7 @@

    diff --git a/app/views/mailer/user_invite.html.erb b/app/views/mailer/user_invite.html.erb index aa435ec9d..0b5151fb3 100644 --- a/app/views/mailer/user_invite.html.erb +++ b/app/views/mailer/user_invite.html.erb @@ -1,12 +1,10 @@ + officing_poll_ballot_sheet_path(@poll.id, ballot_sheet.id) %> diff --git a/app/views/officing/ballot_sheets/new.html.erb b/app/views/officing/ballot_sheets/new.html.erb index 4fbc871ca..c4a159a1f 100644 --- a/app/views/officing/ballot_sheets/new.html.erb +++ b/app/views/officing/ballot_sheets/new.html.erb @@ -4,8 +4,8 @@ <%= form_tag(officing_poll_ballot_sheets_path(@poll)) do %> <%= label_tag :officer_assignment_id, t("officing.poll_budgets.new.booth") %> <%= select_tag :officer_assignment_id, - booths_for_officer_select_options(@officer_assignments), - { prompt: t("officing.poll_budgets.new.select_booth") } %> + booths_for_officer_select_options(@officer_assignments), + { prompt: t("officing.poll_budgets.new.select_booth") } %> <%= label_tag :data, t("officing.poll_budgets.new.csv_data") %> <%= text_area_tag :data, nil, rows: 10 %> diff --git a/app/views/officing/results/new.html.erb b/app/views/officing/results/new.html.erb index 9b2855133..06f49a251 100644 --- a/app/views/officing/results/new.html.erb +++ b/app/views/officing/results/new.html.erb @@ -6,8 +6,8 @@
    <%= select_tag :officer_assignment_id, - booths_for_officer_select_options(@officer_assignments), - { prompt: t("officing.results.new.select_booth") } %> + booths_for_officer_select_options(@officer_assignments), + { prompt: t("officing.results.new.select_booth") } %>
    diff --git a/app/views/organizations/registrations/new.html.erb b/app/views/organizations/registrations/new.html.erb index 1b5bfbd12..09b462f6d 100644 --- a/app/views/organizations/registrations/new.html.erb +++ b/app/views/organizations/registrations/new.html.erb @@ -9,8 +9,8 @@ <%= f.fields_for :organization do |fo| %> <%= fo.text_field :name, autofocus: true, maxlength: Organization.name_max_length %> <%= fo.text_field :responsible_name, - maxlength: Organization.responsible_name_max_length, - hint: t("devise_views.organizations.registrations.new.responsible_name_note") %> + maxlength: Organization.responsible_name_max_length, + hint: t("devise_views.organizations.registrations.new.responsible_name_note") %> <% end %> <%= f.email_field :email %> @@ -25,13 +25,13 @@ label: t("devise_views.organizations.registrations.new.password_confirmation_label") %> <%= f.check_box :terms_of_service, - title: t("devise_views.users.registrations.new.terms_title"), - label: t("devise_views.users.registrations.new.terms", - terms: link_to(t("devise_views.users.registrations.new.terms_link"), - "/conditions", - title: t("shared.target_blank"), - target: "_blank") - ) %> + title: t("devise_views.users.registrations.new.terms_title"), + label: t("devise_views.users.registrations.new.terms", + terms: link_to(t("devise_views.users.registrations.new.terms_link"), + "/conditions", + title: t("shared.target_blank"), + target: "_blank") + ) %>
    <%= f.submit t("devise_views.organizations.registrations.new.submit"), class: "button expanded" %> diff --git a/app/views/organizations/registrations/success.html.erb b/app/views/organizations/registrations/success.html.erb index e4425b53a..252c2ee7f 100644 --- a/app/views/organizations/registrations/success.html.erb +++ b/app/views/organizations/registrations/success.html.erb @@ -5,5 +5,6 @@

    <%= t("devise_views.organizations.registrations.success.instructions_3") %>

    <%= link_to t("devise_views.organizations.registrations.success.back_to_index"), - root_path, class: "button margin-top expanded" %> + root_path, + class: "button margin-top expanded" %>

    diff --git a/app/views/pages/help/_budgets.html.erb b/app/views/pages/help/_budgets.html.erb index 21d8c53d0..8712d9708 100644 --- a/app/views/pages/help/_budgets.html.erb +++ b/app/views/pages/help/_budgets.html.erb @@ -1,6 +1,6 @@ <%= render Pages::Help::SectionComponent.new("budgets") do %>

    <%= sanitize(t("pages.help.budgets.description", - link: link_to(t("pages.help.budgets.link"), budgets_path))) %> + link: link_to(t("pages.help.budgets.link"), budgets_path))) %>

    <% end %> diff --git a/app/views/pages/help/_debates.html.erb b/app/views/pages/help/_debates.html.erb index db380a20e..262e2bb8b 100644 --- a/app/views/pages/help/_debates.html.erb +++ b/app/views/pages/help/_debates.html.erb @@ -1,14 +1,14 @@ <%= render Pages::Help::SectionComponent.new("debates") do %>

    <%= sanitize(t("pages.help.debates.description", - org: setting["org_name"], - link: link_to(t("pages.help.debates.link"), debates_path))) %> + org: setting["org_name"], + link: link_to(t("pages.help.debates.link"), debates_path))) %>

    • <%= sanitize(t("pages.help.debates.feature", - link: link_to(t("pages.help.debates.feature_link", org: setting["org_name"]), - new_user_registration_path))) %> + link: link_to(t("pages.help.debates.feature_link", org: setting["org_name"]), + new_user_registration_path))) %>
    <% end %> diff --git a/app/views/pages/help/_polls.html.erb b/app/views/pages/help/_polls.html.erb index c7d1dd40c..f135c38c8 100644 --- a/app/views/pages/help/_polls.html.erb +++ b/app/views/pages/help/_polls.html.erb @@ -1,13 +1,13 @@ <%= render Pages::Help::SectionComponent.new("polls") do %>

    <%= sanitize(t("pages.help.polls.description", - link: link_to(t("pages.help.polls.link"), polls_path))) %> + link: link_to(t("pages.help.polls.link"), polls_path))) %>

    • <%= sanitize(t("pages.help.polls.feature_1", - link: link_to(t("pages.help.polls.feature_1_link", org_name: setting["org_name"]), - new_user_registration_path))) %> + link: link_to(t("pages.help.polls.feature_1_link", org_name: setting["org_name"]), + new_user_registration_path))) %>
    <% end %> diff --git a/app/views/pages/help/_processes.html.erb b/app/views/pages/help/_processes.html.erb index 18178f385..38352e135 100644 --- a/app/views/pages/help/_processes.html.erb +++ b/app/views/pages/help/_processes.html.erb @@ -6,8 +6,8 @@
    • <%= sanitize(t("pages.help.processes.feature", - link: link_to(t("pages.help.processes.feature_link", org_name: setting["org_name"]), - new_user_registration_path))) %> + link: link_to(t("pages.help.processes.feature_link", org_name: setting["org_name"]), + new_user_registration_path))) %>
    <% end %> diff --git a/app/views/pages/help/_proposals.html.erb b/app/views/pages/help/_proposals.html.erb index ef6875e67..9a8634eb9 100644 --- a/app/views/pages/help/_proposals.html.erb +++ b/app/views/pages/help/_proposals.html.erb @@ -1,6 +1,6 @@ <%= render Pages::Help::SectionComponent.new("proposals") do %>

    <%= sanitize(t("pages.help.proposals.description", - link: link_to(t("pages.help.proposals.link"), proposals_path))) %> + link: link_to(t("pages.help.proposals.link"), proposals_path))) %>

    <% end %> diff --git a/app/views/polls/_callout.html.erb b/app/views/polls/_callout.html.erb index 5a837d0e3..432d8c984 100644 --- a/app/views/polls/_callout.html.erb +++ b/app/views/polls/_callout.html.erb @@ -2,13 +2,13 @@ <% if current_user.nil? %>
    <%= sanitize(t("polls.show.cant_answer_not_logged_in", - signin: link_to_signin(class: "probe-message"), - signup: link_to_signup(class: "probe-message"))) %> + signin: link_to_signin(class: "probe-message"), + signup: link_to_signup(class: "probe-message"))) %>
    <% elsif current_user.unverified? %>
    <%= sanitize(t("polls.show.cant_answer_verify", - verify_link: link_to(t("polls.show.verify_link"), verification_path))) %> + verify_link: link_to(t("polls.show.verify_link"), verification_path))) %>
    <% elsif @poll.expired? %>
    diff --git a/app/views/polls/_poll_header.html.erb b/app/views/polls/_poll_header.html.erb index 77e95679d..73cd608db 100644 --- a/app/views/polls/_poll_header.html.erb +++ b/app/views/polls/_poll_header.html.erb @@ -23,11 +23,11 @@
    diff --git a/app/views/polls/show.html.erb b/app/views/polls/show.html.erb index c88a7ce0a..3d9d88494 100644 --- a/app/views/polls/show.html.erb +++ b/app/views/polls/show.html.erb @@ -2,11 +2,11 @@ <%= provide :meta_description, t("social_share.polls_show.description_#{@poll.id}", default: @poll.title) %> <%= provide :social_media_meta_tags do %> <%= render "shared/social_media_meta_tags", - social_url: poll_url, - social_title: t("social_share.polls_show.title_#{@poll.id}", default: @poll.title), - social_description: t("social_share.polls_show.facebook_#{@poll.id}", default: @poll.title), - twitter_image_url: "social_media_polls_twitter.jpg", - og_image_url: "social_media_polls.jpg" %> + social_url: poll_url, + social_title: t("social_share.polls_show.title_#{@poll.id}", default: @poll.title), + social_description: t("social_share.polls_show.facebook_#{@poll.id}", default: @poll.title), + twitter_image_url: "social_media_polls_twitter.jpg", + og_image_url: "social_media_polls.jpg" %> <% end %>
    diff --git a/app/views/proposal_notifications/new.html.erb b/app/views/proposal_notifications/new.html.erb index 7089e7f49..9075def3a 100644 --- a/app/views/proposal_notifications/new.html.erb +++ b/app/views/proposal_notifications/new.html.erb @@ -7,9 +7,9 @@

    <%= sanitize(t("proposal_notifications.new.info_about_receivers", - count: @proposal.users_to_notify.count, - proposal_page: link_to(t("proposal_notifications.new.proposal_page"), - proposal_path(@proposal, anchor: "comments")))) %> + count: @proposal.users_to_notify.count, + proposal_page: link_to(t("proposal_notifications.new.proposal_page"), + proposal_path(@proposal, anchor: "comments")))) %>

    diff --git a/app/views/proposals/_info.html.erb b/app/views/proposals/_info.html.erb index 71060a514..ec5d2b866 100644 --- a/app/views/proposals/_info.html.erb +++ b/app/views/proposals/_info.html.erb @@ -68,8 +68,8 @@ <% if feature?(:allow_attached_documents) %> <%= render "documents/documents", - documents: @proposal.documents, - max_documents_allowed: Proposal.max_documents_allowed %> + documents: @proposal.documents, + max_documents_allowed: Proposal.max_documents_allowed %> <% end %> <%= render "shared/tags", taggable: @proposal %> diff --git a/app/views/proposals/_social_share.html.erb b/app/views/proposals/_social_share.html.erb index fedfa587a..2dcc2ffde 100644 --- a/app/views/proposals/_social_share.html.erb +++ b/app/views/proposals/_social_share.html.erb @@ -1,10 +1,10 @@ <%= render "shared/social_share", - share_title: share_title, - title: proposal.title, - url: proposal_url(proposal), - description: t("proposals.share.message", - title: proposal.title, - handle: setting["org_name"]), - mobile: t("proposals.share.message", - title: proposal.title, - handle: setting["twitter_handle"]) %> + share_title: share_title, + title: proposal.title, + url: proposal_url(proposal), + description: t("proposals.share.message", + title: proposal.title, + handle: setting["org_name"]), + mobile: t("proposals.share.message", + title: proposal.title, + handle: setting["twitter_handle"]) %> diff --git a/app/views/proposals/_supports.html.erb b/app/views/proposals/_supports.html.erb index 2ff839593..e58d353a4 100644 --- a/app/views/proposals/_supports.html.erb +++ b/app/views/proposals/_supports.html.erb @@ -10,7 +10,7 @@ "> <%= t("proposals.proposal.supports_necessary", - number: number_with_delimiter(Proposal.votes_needed_for_success)) %> + number: number_with_delimiter(Proposal.votes_needed_for_success)) %> diff --git a/app/views/proposals/retire_form.html.erb b/app/views/proposals/retire_form.html.erb index 4fb65cb3e..e22d80255 100644 --- a/app/views/proposals/retire_form.html.erb +++ b/app/views/proposals/retire_form.html.erb @@ -16,8 +16,9 @@ <%= render "shared/errors", resource: @proposal %>
    - <%= f.select :retired_reason, retire_proposals_options, - include_blank: t("proposals.retire_form.retired_reason_blank") %> + <%= f.select :retired_reason, + retire_proposals_options, + include_blank: t("proposals.retire_form.retired_reason_blank") %>
    @@ -25,8 +26,9 @@ <%= f.translatable_fields do |translations_form| %>
    <%= translations_form.text_area :retired_explanation, - rows: 4, maxlength: 500, - placeholder: t("proposals.retire_form.retired_explanation_placeholder") %> + rows: 4, + maxlength: 500, + placeholder: t("proposals.retire_form.retired_explanation_placeholder") %>
    <% end %> diff --git a/app/views/proposals/share.html.erb b/app/views/proposals/share.html.erb index 1ee1938de..26e2453a6 100644 --- a/app/views/proposals/share.html.erb +++ b/app/views/proposals/share.html.erb @@ -1,9 +1,9 @@ <% provide :title do %><%= @proposal.title %><% end %> <% provide :social_media_meta_tags do %> <%= render "shared/social_media_meta_tags", - social_url: proposal_url(@proposal), - social_title: @proposal.title, - social_description: @proposal.summary %> + social_url: proposal_url(@proposal), + social_title: @proposal.title, + social_description: @proposal.summary %> <% end %> <% content_for :canonical do %> <%= render "shared/canonical", href: proposal_url(@proposal) %> @@ -25,10 +25,10 @@

    <%= render "shared/social_share", - title: @proposal.title, - url: proposal_url(@proposal), - description: @proposal.summary, - mobile: @proposal.title %> + title: @proposal.title, + url: proposal_url(@proposal), + description: @proposal.summary, + mobile: @proposal.title %> <% if can?(:dashboard, @proposal) %>
    diff --git a/app/views/proposals/show.html.erb b/app/views/proposals/show.html.erb index ea2c5e844..d3dafbc8f 100644 --- a/app/views/proposals/show.html.erb +++ b/app/views/proposals/show.html.erb @@ -3,11 +3,11 @@ <% content_for :meta_description do %><%= @proposal.summary %><% end %> <% provide :social_media_meta_tags do %> <%= render "shared/social_media_meta_tags", - social_url: proposal_url(@proposal), - social_title: @proposal.title, - social_description: @proposal.summary, - twitter_image_url: (@proposal.image.present? ? polymorphic_path(@proposal.image.variant(:thumb)) : nil), - og_image_url: (@proposal.image.present? ? polymorphic_path(@proposal.image.variant(:thumb)) : nil) %> + social_url: proposal_url(@proposal), + social_title: @proposal.title, + social_description: @proposal.summary, + twitter_image_url: (@proposal.image.present? ? polymorphic_path(@proposal.image.variant(:thumb)) : nil), + og_image_url: (@proposal.image.present? ? polymorphic_path(@proposal.image.variant(:thumb)) : nil) %> <% end %> <% content_for :canonical do %> <%= render "shared/canonical", href: proposal_url(@proposal) %> diff --git a/app/views/relationable/_form.html.erb b/app/views/relationable/_form.html.erb index 4f2def3aa..44d22d44c 100644 --- a/app/views/relationable/_form.html.erb +++ b/app/views/relationable/_form.html.erb @@ -12,8 +12,8 @@
    <%= text_field_tag :url, "", - "aria-describedby": "related_content_help_text", - placeholder: t("related_content.placeholder", url: root_url) %> + "aria-describedby": "related_content_help_text", + placeholder: t("related_content.placeholder", url: root_url) %> <%= hidden_field_tag :relationable_klass, relationable.class.name %> <%= hidden_field_tag :relationable_id, relationable.id %> diff --git a/app/views/shared/_filter_subnav.html.erb b/app/views/shared/_filter_subnav.html.erb index fc4c5a950..ab9161ef6 100644 --- a/app/views/shared/_filter_subnav.html.erb +++ b/app/views/shared/_filter_subnav.html.erb @@ -6,7 +6,7 @@
  • <%= t("#{i18n_namespace}.filters.#{filter}") %>

  • <% else %>
  • <%= link_to t("#{i18n_namespace}.filters.#{filter}"), - current_path_with_query_params(filter: filter, page: 1) %>
  • + current_path_with_query_params(filter: filter, page: 1) %> <% end %> <% end %> diff --git a/app/views/shared/_filter_subnav_vertical.html.erb b/app/views/shared/_filter_subnav_vertical.html.erb index e1af05ef5..c4d6ae084 100644 --- a/app/views/shared/_filter_subnav_vertical.html.erb +++ b/app/views/shared/_filter_subnav_vertical.html.erb @@ -8,7 +8,7 @@ <% else %>
  • <%= link_to t("#{i18n_namespace}.filters.#{filter}"), - current_path_with_query_params(filter: filter, page: 1) %>
  • + current_path_with_query_params(filter: filter, page: 1) %> <% end %> <% end %> diff --git a/app/views/shared/_globalize_locales.html.erb b/app/views/shared/_globalize_locales.html.erb index 38464ac3b..88aa4064b 100644 --- a/app/views/shared/_globalize_locales.html.erb +++ b/app/views/shared/_globalize_locales.html.erb @@ -1,6 +1,6 @@ <% if translations_interface_enabled? %> <%= render "shared/common_globalize_locales", - resource: resource, - display_style: lambda { |locale| enable_translation_style(resource, locale) }, - manage_languages: defined?(manage_languages) ? manage_languages : true %> + resource: resource, + display_style: lambda { |locale| enable_translation_style(resource, locale) }, + manage_languages: defined?(manage_languages) ? manage_languages : true %> <% end %> diff --git a/app/views/shared/_suggest.html.erb b/app/views/shared/_suggest.html.erb index 4bdeb6319..ad88e9174 100644 --- a/app/views/shared/_suggest.html.erb +++ b/app/views/shared/_suggest.html.erb @@ -4,8 +4,8 @@

    <%= t("shared.suggest.#{resource_name}.found", - count: @resources.count, - query: @search_terms) %> + count: @resources.count, + query: @search_terms) %>

    @@ -19,9 +19,9 @@

    <%= t("shared.suggest.#{resource_name}.message", - count: @resources.count, - query: @search_terms, - limit: @limit) %> + count: @resources.count, + query: @search_terms, + limit: @limit) %> <%= link_to t("shared.suggest.#{resource_name}.see_all"), polymorphic_path(resource_model, search: @search_terms) %> diff --git a/app/views/topics/_informative_text.html.erb b/app/views/topics/_informative_text.html.erb index 43604a623..599a84436 100644 --- a/app/views/topics/_informative_text.html.erb +++ b/app/views/topics/_informative_text.html.erb @@ -7,6 +7,7 @@ <% else %>

    <%= sanitize(t("community.show.create_first_community_topic.sub_first_theme", - sign_in: link_to_signin, sign_up: link_to_signup)) %> + sign_in: link_to_signin, + sign_up: link_to_signup)) %>
    <% end %> diff --git a/app/views/topics/show.html.erb b/app/views/topics/show.html.erb index 318904a72..767d94efa 100644 --- a/app/views/topics/show.html.erb +++ b/app/views/topics/show.html.erb @@ -2,9 +2,10 @@
    - <%= back_link_to community_path(@community), t("community.show.back", - community: community_text(@community), - proposal: community_title(@community)) %> + <%= back_link_to community_path(@community), + t("community.show.back", + community: community_text(@community), + proposal: community_title(@community)) %>

    <%= @topic.title %>

    diff --git a/app/views/users/registrations/delete_form.html.erb b/app/views/users/registrations/delete_form.html.erb index c3b19fe01..1e8ba16e1 100644 --- a/app/views/users/registrations/delete_form.html.erb +++ b/app/views/users/registrations/delete_form.html.erb @@ -15,8 +15,8 @@

    <%= f.text_field :erase_reason, - autofocus: true, - label: t("devise_views.users.registrations.delete_form.erase_reason_label") %> + autofocus: true, + label: t("devise_views.users.registrations.delete_form.erase_reason_label") %> <%= f.submit t("devise_views.users.registrations.delete_form.submit"), class: "button alert expanded" %> <% end %> diff --git a/app/views/users/registrations/edit.html.erb b/app/views/users/registrations/edit.html.erb index 28bff0014..8750fd963 100644 --- a/app/views/users/registrations/edit.html.erb +++ b/app/views/users/registrations/edit.html.erb @@ -7,8 +7,8 @@
    <%= f.email_field :email, - label: t("devise_views.users.registrations.edit.email_label"), - autofocus: true %> + label: t("devise_views.users.registrations.edit.email_label"), + autofocus: true %>
    @@ -19,22 +19,22 @@
    <%= f.password_field :password, - autocomplete: "off", - label: t("devise_views.users.registrations.edit.password_label"), - hint: t("devise_views.users.registrations.edit.leave_blank") %> + autocomplete: "off", + label: t("devise_views.users.registrations.edit.password_label"), + hint: t("devise_views.users.registrations.edit.leave_blank") %>
    <%= f.password_field :password_confirmation, - label: t("devise_views.users.registrations.edit.password_confirmation_label"), - autocomplete: "off" %> + label: t("devise_views.users.registrations.edit.password_confirmation_label"), + autocomplete: "off" %>
    <%= f.password_field :current_password, - label: t("devise_views.users.registrations.edit.current_password_label"), - autocomplete: "off", - hint: t("devise_views.users.registrations.edit.need_current") %> + label: t("devise_views.users.registrations.edit.current_password_label"), + autocomplete: "off", + hint: t("devise_views.users.registrations.edit.need_current") %>
    diff --git a/app/views/users/registrations/new.html.erb b/app/views/users/registrations/new.html.erb index a8b0e83b5..6f028e199 100644 --- a/app/views/users/registrations/new.html.erb +++ b/app/views/users/registrations/new.html.erb @@ -8,7 +8,8 @@

    <%= sanitize(t("devise_views.users.registrations.new.organization_signup", - signup_link: link_to(t("devise_views.users.registrations.new.organization_signup_link"), new_organization_registration_path))) %> + signup_link: link_to(t("devise_views.users.registrations.new.organization_signup_link"), + new_organization_registration_path))) %>

    @@ -34,12 +35,12 @@ <% end %> <%= f.check_box :terms_of_service, - title: t("devise_views.users.registrations.new.terms_title"), - label: t("devise_views.users.registrations.new.terms", - terms: link_to(t("devise_views.users.registrations.new.terms_link"), "/conditions", - title: t("shared.target_blank"), - target: "_blank") - ) %> + title: t("devise_views.users.registrations.new.terms_title"), + label: t("devise_views.users.registrations.new.terms", + terms: link_to(t("devise_views.users.registrations.new.terms_link"), "/conditions", + title: t("shared.target_blank"), + target: "_blank") + ) %>
    <%= f.submit t("devise_views.users.registrations.new.submit"), class: "button expanded" %> diff --git a/app/views/users/registrations/success.html.erb b/app/views/users/registrations/success.html.erb index b1e280398..c5f8cb77f 100644 --- a/app/views/users/registrations/success.html.erb +++ b/app/views/users/registrations/success.html.erb @@ -5,5 +5,6 @@

    <%= t("devise_views.users.registrations.success.instructions_2") %>

    <%= link_to t("devise_views.users.registrations.success.back_to_index"), - root_path, class: "button margin-top expanded" %> + root_path, + class: "button margin-top expanded" %>

    diff --git a/app/views/valuation/budget_investments/_dossier_form.html.erb b/app/views/valuation/budget_investments/_dossier_form.html.erb index 243d9f147..5f2f80f80 100644 --- a/app/views/valuation/budget_investments/_dossier_form.html.erb +++ b/app/views/valuation/budget_investments/_dossier_form.html.erb @@ -42,14 +42,14 @@
    <%= f.number_field :price, - label: t("valuation.budget_investments.edit.price", currency: budget.currency_symbol), - max: 1000000000000000 %> + label: t("valuation.budget_investments.edit.price", currency: budget.currency_symbol), + max: 1000000000000000 %>
    <%= f.number_field :price_first_year, - label: t("valuation.budget_investments.edit.price_first_year", currency: budget.currency_symbol), - max: 1000000000000000 %> + label: t("valuation.budget_investments.edit.price_first_year", currency: budget.currency_symbol), + max: 1000000000000000 %>
    @@ -73,9 +73,9 @@
    <%= f.check_box :valuation_finished, - id: "js-investment-report-alert", - "data-alert": t("valuation.budget_investments.edit.valuation_finished_alert"), - "data-not-feasible-alert": t("valuation.budget_investments.edit.not_feasible_alert") %> + id: "js-investment-report-alert", + "data-alert": t("valuation.budget_investments.edit.valuation_finished_alert"), + "data-not-feasible-alert": t("valuation.budget_investments.edit.not_feasible_alert") %>
    diff --git a/app/views/verification/residence/new.html.erb b/app/views/verification/residence/new.html.erb index 8cc5c745a..e62e890f4 100644 --- a/app/views/verification/residence/new.html.erb +++ b/app/views/verification/residence/new.html.erb @@ -64,17 +64,17 @@
    <%= f.text_field :postal_code, - hint: t("verification.residence.new.postal_code_note") %> + hint: t("verification.residence.new.postal_code_note") %>
    <%= f.check_box :terms_of_service, - title: t("verification.residence.new.accept_terms_text_title"), - label: t("verification.residence.new.accept_terms_text", - terms_url: link_to(t("verification.residence.new.terms"), page_path("census_terms"), - title: t("shared.target_blank"), - target: "_blank") - ) %> + title: t("verification.residence.new.accept_terms_text_title"), + label: t("verification.residence.new.accept_terms_text", + terms_url: link_to(t("verification.residence.new.terms"), page_path("census_terms"), + title: t("shared.target_blank"), + target: "_blank") + ) %>
    diff --git a/app/views/welcome/index.html.erb b/app/views/welcome/index.html.erb index c31ab5398..717986f95 100644 --- a/app/views/welcome/index.html.erb +++ b/app/views/welcome/index.html.erb @@ -8,7 +8,7 @@ <% provide :social_media_meta_tags do %> <%= render "shared/social_media_meta_tags", - social_url: root_url %> + social_url: root_url %> <% end %> <%= render "shared/header", header: @header %> @@ -34,7 +34,7 @@ <% if feature?("user.recommendations") && (@recommended_debates.present? || @recommended_proposals.present?) %> <%= render "recommended", - recommended_debates: @recommended_debates, - recommended_proposals: @recommended_proposals %> + recommended_debates: @recommended_debates, + recommended_proposals: @recommended_proposals %> <% end %> diff --git a/bin/rspec b/bin/rspec index 76b37c19f..b50d67608 100755 --- a/bin/rspec +++ b/bin/rspec @@ -14,7 +14,7 @@ end require "pathname" ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile", - Pathname.new(__FILE__).realpath) + Pathname.new(__FILE__).realpath) require "rubygems" require "bundler/setup" diff --git a/db/migrate/20171115164152_add_time_zone_to_default_datetimes.rb b/db/migrate/20171115164152_add_time_zone_to_default_datetimes.rb index b02a24f74..8edb1c972 100644 --- a/db/migrate/20171115164152_add_time_zone_to_default_datetimes.rb +++ b/db/migrate/20171115164152_add_time_zone_to_default_datetimes.rb @@ -1,11 +1,11 @@ class AddTimeZoneToDefaultDatetimes < ActiveRecord::Migration[4.2] def change change_column_default :users, :password_changed_at, - from: Time.zone.local(2015, 1, 1, 1, 1, 1), - to: DateTime.new(2015, 1, 1, 1, 1, 1, "+00:00") + from: Time.zone.local(2015, 1, 1, 1, 1, 1), + to: DateTime.new(2015, 1, 1, 1, 1, 1, "+00:00") change_column_default :locks, :locked_until, - from: Time.zone.local(2000, 1, 1, 1, 1, 1), - to: DateTime.new(2000, 1, 1, 1, 1, 1, "+00:00") + from: Time.zone.local(2000, 1, 1, 1, 1, 1), + to: DateTime.new(2000, 1, 1, 1, 1, 1, "+00:00") end end diff --git a/spec/components/sdg/tag_list_component_spec.rb b/spec/components/sdg/tag_list_component_spec.rb index d61f3029d..1139ae6ef 100644 --- a/spec/components/sdg/tag_list_component_spec.rb +++ b/spec/components/sdg/tag_list_component_spec.rb @@ -3,8 +3,8 @@ require "rails_helper" describe SDG::TagListComponent do let(:debate) do create(:debate, - sdg_goals: [SDG::Goal[3]], - sdg_targets: [SDG::Target[3.2], create(:sdg_local_target, code: "3.2.1")] + sdg_goals: [SDG::Goal[3]], + sdg_targets: [SDG::Target[3.2], create(:sdg_local_target, code: "3.2.1")] ) end let(:component) { SDG::TagListComponent.new(debate) } diff --git a/spec/components/sdg/targets/plain_tag_list_component_spec.rb b/spec/components/sdg/targets/plain_tag_list_component_spec.rb index 9606153b9..04bd08cad 100644 --- a/spec/components/sdg/targets/plain_tag_list_component_spec.rb +++ b/spec/components/sdg/targets/plain_tag_list_component_spec.rb @@ -58,7 +58,7 @@ describe SDG::Targets::PlainTagListComponent do expect(page).to have_css "li", text: "target 1.1" expect(page).to have_selector "a", count: 1 expect(page).to have_link "2+", - title: "2 more targets", - href: "/debates/#{debate.to_param}" + title: "2 more targets", + href: "/debates/#{debate.to_param}" end end diff --git a/spec/components/sdg/targets/tag_list_component_spec.rb b/spec/components/sdg/targets/tag_list_component_spec.rb index db8a7bcff..b2dcf1146 100644 --- a/spec/components/sdg/targets/tag_list_component_spec.rb +++ b/spec/components/sdg/targets/tag_list_component_spec.rb @@ -40,14 +40,14 @@ describe SDG::Targets::TagListComponent do expect(page).to have_css "li", count: 3 expect(page).to have_link "target 1.1", - title: "See all Debates related to target 1.1", - href: "/debates?advanced_search#{CGI.escape("[target]")}=1.1" + title: "See all Debates related to target 1.1", + href: "/debates?advanced_search#{CGI.escape("[target]")}=1.1" expect(page).to have_link "target 3.2", - title: "See all Debates related to target 3.2", - href: "/debates?advanced_search#{CGI.escape("[target]")}=3.2" + title: "See all Debates related to target 3.2", + href: "/debates?advanced_search#{CGI.escape("[target]")}=3.2" expect(page).to have_link "target 3.2.1", - title: "See all Debates related to target 3.2.1", - href: "/debates?advanced_search#{CGI.escape("[target]")}=3.2.1" + title: "See all Debates related to target 3.2.1", + href: "/debates?advanced_search#{CGI.escape("[target]")}=3.2.1" end it "orders targets by code" do @@ -64,7 +64,7 @@ describe SDG::Targets::TagListComponent do expect(page).to have_selector "a", count: 2 expect(page).to have_link "target 1.1" expect(page).to have_link "2+", - title: "2 more targets", - href: "/debates/#{debate.to_param}" + title: "2 more targets", + href: "/debates/#{debate.to_param}" end end diff --git a/spec/components/valuation/budgets/row_component_spec.rb b/spec/components/valuation/budgets/row_component_spec.rb index 63d0e7370..212096a82 100644 --- a/spec/components/valuation/budgets/row_component_spec.rb +++ b/spec/components/valuation/budgets/row_component_spec.rb @@ -30,9 +30,9 @@ describe Valuation::Budgets::RowComponent do it "does not count investments with valuation finished" do budget = create(:budget, :valuating) create(:budget_investment, :visible_to_valuators, - budget: budget, - valuators: [valuator], - valuation_finished: true) + budget: budget, + valuators: [valuator], + valuation_finished: true) render_inline Valuation::Budgets::RowComponent.new(budget: budget) @@ -81,9 +81,9 @@ describe Valuation::Budgets::RowComponent do it "is shown when the assigned investments have finished valuation" do budget = create(:budget, :valuating) create(:budget_investment, :visible_to_valuators, - budget: budget, - valuators: [valuator], - valuation_finished: true) + budget: budget, + valuators: [valuator], + valuation_finished: true) render_inline Valuation::Budgets::RowComponent.new(budget: budget) diff --git a/spec/factories/polls.rb b/spec/factories/polls.rb index ed493c21c..0819457b9 100644 --- a/spec/factories/polls.rb +++ b/spec/factories/polls.rb @@ -179,8 +179,8 @@ FactoryBot.define do officer_assignment do association :poll_officer_assignment, - booth_assignment: booth_assignment, - officer: officer || association(:poll_officer) + booth_assignment: booth_assignment, + officer: officer || association(:poll_officer) end end diff --git a/spec/i18n_spec.rb b/spec/i18n_spec.rb index 0d8c5a0c2..41bc9fc28 100644 --- a/spec/i18n_spec.rb +++ b/spec/i18n_spec.rb @@ -8,12 +8,12 @@ describe "I18n" do it "does not have missing keys" do expect(missing_keys).to be_empty, - "Missing #{missing_keys.leaves.count} i18n keys, run `i18n-tasks missing' to show them" + "Missing #{missing_keys.leaves.count} i18n keys, run `i18n-tasks missing' to show them" end it "does not have unused keys" do expect(unused_keys).to be_empty, - "#{unused_keys.leaves.count} unused i18n keys, run `i18n-tasks unused' to show them" + "#{unused_keys.leaves.count} unused i18n keys, run `i18n-tasks unused' to show them" end context "Plurals" do diff --git a/spec/models/dashboard/action_spec.rb b/spec/models/dashboard/action_spec.rb index 5364ff64c..5a10ffdd4 100644 --- a/spec/models/dashboard/action_spec.rb +++ b/spec/models/dashboard/action_spec.rb @@ -290,9 +290,9 @@ describe Dashboard::Action do it "when proposal has been created today and day_offset is valid only for today" do expect(Dashboard::Action.detect_new_actions_since(Date.yesterday, - proposal)).to include(resource.id) + proposal)).to include(resource.id) expect(Dashboard::Action.detect_new_actions_since(Date.yesterday, - proposal)).to include(action.id) + proposal)).to include(action.id) end it "when proposal has received a new vote today" do @@ -302,9 +302,9 @@ describe Dashboard::Action do create(:vote, voter: proposal.author, votable: proposal) expect(Dashboard::Action.detect_new_actions_since(Date.yesterday, - proposal)).to include(action.id) + proposal)).to include(action.id) expect(Dashboard::Action.detect_new_actions_since(Date.yesterday, - proposal)).not_to include(resource.id) + proposal)).not_to include(resource.id) end end @@ -321,9 +321,9 @@ describe Dashboard::Action do it "when day_offset field is valid for today and invalid for yesterday" do expect(Dashboard::Action.detect_new_actions_since(Date.yesterday, - proposal)).to include(resource.id) + proposal)).to include(resource.id) expect(Dashboard::Action.detect_new_actions_since(Date.yesterday, - proposal)).to include(action.id) + proposal)).to include(action.id) end it "when proposal has received a new vote today" do @@ -333,9 +333,9 @@ describe Dashboard::Action do create(:vote, voter: proposal.author, votable: proposal) expect(Dashboard::Action.detect_new_actions_since(Date.yesterday, - proposal)).to include(action.id) + proposal)).to include(action.id) expect(Dashboard::Action.detect_new_actions_since(Date.yesterday, - proposal)).not_to include(resource.id) + proposal)).not_to include(resource.id) end end end diff --git a/spec/models/legislation/annotation_spec.rb b/spec/models/legislation/annotation_spec.rb index 965eac3e8..b06d55696 100644 --- a/spec/models/legislation/annotation_spec.rb +++ b/spec/models/legislation/annotation_spec.rb @@ -21,7 +21,8 @@ RSpec.describe Legislation::Annotation, type: :model do " ea. Per ne impedit iracundia neglegentur. Consetetur neglegentur eum ut, vis animal legimus inimicus id."\ "\n\n"\ "His audiam" - annotation = create(:legislation_annotation, + annotation = create( + :legislation_annotation, draft_version: draft_version, quote: quote, ranges: [{ "start" => "/p[1]", "startOffset" => 6, "end" => "/p[3]", "endOffset" => 11 }] @@ -46,7 +47,8 @@ RSpec.describe Legislation::Annotation, type: :model do " facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore"\ " te feugait nulla facilisi.\r\n\r\nExpetenda tincidunt in sed, ex partem placerat sea, porro commodo ex eam. His putant"\ " aeterno interesset at. Usu ea mundi tincidunt, omnium virtute aliquando ius ex. Ea aperiri sententiae duo" - annotation = create(:legislation_annotation, + annotation = create( + :legislation_annotation, draft_version: draft_version, quote: quote, ranges: [{ "start" => "/p[1]", "startOffset" => 273, "end" => "/p[2]", "endOffset" => 190 }] @@ -92,7 +94,8 @@ RSpec.describe Legislation::Annotation, type: :model do " freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of"\ " free software (and charge for them if you wish)" - annotation = create(:legislation_annotation, + annotation = create( + :legislation_annotation, draft_version: draft_version, quote: quote, ranges: [{ "start" => "/p[2]", "startOffset" => 127, "end" => "/p[3]", "endOffset" => 223 }] diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 947df5e94..fc295d20f 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -491,16 +491,16 @@ describe User do describe "#erase" do it "erases user information and marks him as erased" do user = create(:user, - username: "manolo", - email: "a@a.com", - unconfirmed_email: "a@a.com", - phone_number: "5678", - confirmed_phone: "5678", - unconfirmed_phone: "5678", - encrypted_password: "foobar", - confirmation_token: "token1", - reset_password_token: "token2", - email_verification_token: "token3") + username: "manolo", + email: "a@a.com", + unconfirmed_email: "a@a.com", + phone_number: "5678", + confirmed_phone: "5678", + unconfirmed_phone: "5678", + encrypted_password: "foobar", + confirmation_token: "token1", + reset_password_token: "token2", + email_verification_token: "token3") user.erase("a test") user.reload diff --git a/spec/system/admin/budget_investments_spec.rb b/spec/system/admin/budget_investments_spec.rb index 904ce0c2c..1f1514990 100644 --- a/spec/system/admin/budget_investments_spec.rb +++ b/spec/system/admin/budget_investments_spec.rb @@ -301,16 +301,20 @@ describe "Admin budget investments", :admin do end scenario "Filtering by under valuation" do - create(:budget_investment, + create( + :budget_investment, :with_administrator, :with_valuator, :open, title: "Investment without valuation", - budget: budget) - create(:budget_investment, + budget: budget + ) + create( + :budget_investment, :with_administrator, title: "Investment with valuation", - budget: budget) + budget: budget + ) visit admin_budget_budget_investments_path(budget_id: budget) expect(page).to have_link("Investment without valuation") @@ -928,12 +932,12 @@ describe "Admin budget investments", :admin do user = create(:user, username: "Rachel", email: "rachel@valuators.org") valuator = create(:valuator, user: user) budget_investment = create(:budget_investment, - :unfeasible, - unfeasibility_explanation: "It is impossible", - price: 1234, - price_first_year: 1000, - administrator: administrator, - valuators: [valuator] + :unfeasible, + unfeasibility_explanation: "It is impossible", + price: 1234, + price_first_year: 1000, + administrator: administrator, + valuators: [valuator] ) visit admin_budget_budget_investments_path(budget_investment.budget) @@ -960,12 +964,12 @@ describe "Admin budget investments", :admin do scenario "Show image and documents on investment details" do budget_investment = create(:budget_investment, - :with_image, - :unfeasible, - unfeasibility_explanation: "It is impossible", - price: 1234, - price_first_year: 1000, - administrator: administrator) + :with_image, + :unfeasible, + unfeasibility_explanation: "It is impossible", + price: 1234, + price_first_year: 1000, + administrator: administrator) document = create(:document, documentable: budget_investment) visit admin_budget_budget_investments_path(budget_investment.budget) @@ -990,10 +994,10 @@ describe "Admin budget investments", :admin do scenario "Does not show related content or hide links on preview" do budget_investment = create(:budget_investment, - :unfeasible, - price: 1234, - price_first_year: 1000, - administrator: administrator) + :unfeasible, + price: 1234, + price_first_year: 1000, + administrator: administrator) visit admin_budget_budget_investments_path(budget_investment.budget) @@ -1006,8 +1010,8 @@ describe "Admin budget investments", :admin do scenario "If budget is finished, investment cannot be edited or valuation comments created" do finished_budget = create(:budget, :finished) budget_investment = create(:budget_investment, - budget: finished_budget, - administrator: administrator) + budget: finished_budget, + administrator: administrator) visit admin_budget_budget_investments_path(budget_investment.budget) within_window(window_opened_by { click_link budget_investment.title }) do @@ -1750,10 +1754,10 @@ describe "Admin budget investments", :admin do context "Columns chooser" do let!(:investment) do create(:budget_investment, - :winner, - :visible_to_valuators, - budget: budget, - author: create(:user, username: "Jon Doe") + :winner, + :visible_to_valuators, + budget: budget, + author: create(:user, username: "Jon Doe") ) end let(:default_columns) do diff --git a/spec/system/admin/poll/booth_assigments_spec.rb b/spec/system/admin/poll/booth_assigments_spec.rb index 6e9ebe695..3ca2df05d 100644 --- a/spec/system/admin/poll/booth_assigments_spec.rb +++ b/spec/system/admin/poll/booth_assigments_spec.rb @@ -240,34 +240,34 @@ describe "Admin booths assignments", :admin do create(:poll_question_answer, title: "Tomorrow", question: question_2) create(:poll_partial_result, - booth_assignment: booth_assignment, - question: question_1, - answer: "Yes", - amount: 11) + booth_assignment: booth_assignment, + question: question_1, + answer: "Yes", + amount: 11) create(:poll_partial_result, - booth_assignment: booth_assignment, - question: question_1, - answer: "No", - amount: 4) + booth_assignment: booth_assignment, + question: question_1, + answer: "No", + amount: 4) create(:poll_partial_result, - booth_assignment: booth_assignment, - question: question_2, - answer: "Today", - amount: 5) + booth_assignment: booth_assignment, + question: question_2, + answer: "Today", + amount: 5) create(:poll_partial_result, - booth_assignment: booth_assignment, - question: question_2, - answer: "Tomorrow", - amount: 6) + booth_assignment: booth_assignment, + question: question_2, + answer: "Tomorrow", + amount: 6) create(:poll_partial_result, - booth_assignment: other_booth_assignment, - question: question_1, - answer: "Yes", - amount: 9999) + booth_assignment: other_booth_assignment, + question: question_1, + answer: "Yes", + amount: 9999) create(:poll_recount, booth_assignment: booth_assignment, diff --git a/spec/system/admin/poll/polls_spec.rb b/spec/system/admin/poll/polls_spec.rb index 202c6b394..88aac7ae3 100644 --- a/spec/system/admin/poll/polls_spec.rb +++ b/spec/system/admin/poll/polls_spec.rb @@ -435,15 +435,15 @@ describe "Admin polls", :admin do [booth_assignment_1, booth_assignment_2, booth_assignment_3].each do |ba| create(:poll_partial_result, - booth_assignment: ba, - question: question_1, - answer: "Yes", - amount: 11) + booth_assignment: ba, + question: question_1, + answer: "Yes", + amount: 11) create(:poll_partial_result, - booth_assignment: ba, - question: question_2, - answer: "Tomorrow", - amount: 5) + booth_assignment: ba, + question: question_2, + answer: "Tomorrow", + amount: 5) end create(:poll_recount, booth_assignment: booth_assignment_1, diff --git a/spec/system/admin/site_customization/content_blocks_spec.rb b/spec/system/admin/site_customization/content_blocks_spec.rb index ef3e35d29..20e74b573 100644 --- a/spec/system/admin/site_customization/content_blocks_spec.rb +++ b/spec/system/admin/site_customization/content_blocks_spec.rb @@ -26,7 +26,7 @@ describe "Admin custom content blocks", :admin do click_link "Create new content block" select I18n.t("admin.site_customization.content_blocks.content_block.names.footer"), - from: "site_customization_content_block_name" + from: "site_customization_content_block_name" select "es", from: "site_customization_content_block_locale" fill_in "site_customization_content_block_body", with: "Some custom content" @@ -51,7 +51,7 @@ describe "Admin custom content blocks", :admin do click_link "Create new content block" select I18n.t("admin.site_customization.content_blocks.content_block.names.top_links"), - from: "site_customization_content_block_name" + from: "site_customization_content_block_name" select "en", from: "site_customization_content_block_locale" fill_in "site_customization_content_block_body", with: "Some custom content" diff --git a/spec/system/admin/system_emails_spec.rb b/spec/system/admin/system_emails_spec.rb index 7c6cdc2f1..27b094b1f 100644 --- a/spec/system/admin/system_emails_spec.rb +++ b/spec/system/admin/system_emails_spec.rb @@ -254,11 +254,13 @@ describe "System Emails" do describe "#evaluation_comment" do scenario "render correctly evaluaton comment mailer with valuator as a sample user" do admin = create(:administrator, user: create(:user, username: "Baby Doe")) - investment = create(:budget_investment, + investment = create( + :budget_investment, title: "Cleaner city", heading: heading, author: user, - administrator: admin) + administrator: admin + ) comment = create(:comment, :valuation, commentable: investment) visit admin_system_email_view_path("evaluation_comment") @@ -270,7 +272,12 @@ describe "System Emails" do expect(page).to have_content comment.body expect(page).to have_link "Cleaner city", - href: admin_budget_budget_investment_url(investment.budget, investment, anchor: "comments", host: app_host) + href: admin_budget_budget_investment_url( + investment.budget, + investment, + anchor: "comments", + host: app_host + ) end scenario "uses a current_user as a sample user for sample regular comments" do diff --git a/spec/system/admin/widgets/cards_spec.rb b/spec/system/admin/widgets/cards_spec.rb index af4f215d2..d34549503 100644 --- a/spec/system/admin/widgets/cards_spec.rb +++ b/spec/system/admin/widgets/cards_spec.rb @@ -168,7 +168,7 @@ describe "Cards", :admin do click_link "Create card" expect(page).to have_link("Go back", - href: admin_site_customization_page_widget_cards_path(custom_page)) + href: admin_site_customization_page_widget_cards_path(custom_page)) fill_in "Title", with: "Card for a custom page" fill_in "Link URL", with: "/any_path" @@ -230,7 +230,7 @@ describe "Cards", :admin do click_link "Edit" expect(page).to have_link("Go back", - href: admin_site_customization_page_widget_cards_path(custom_page)) + href: admin_site_customization_page_widget_cards_path(custom_page)) within(".translatable-fields") do fill_in "Title", with: "Updated title" diff --git a/spec/system/budgets/ballots_spec.rb b/spec/system/budgets/ballots_spec.rb index 62653fdb0..ccd80d364 100644 --- a/spec/system/budgets/ballots_spec.rb +++ b/spec/system/budgets/ballots_spec.rb @@ -163,12 +163,14 @@ describe "Ballots" do scenario "map and content block shoud be visible before and after" do stub_const("#{Budgets::InvestmentsController}::PER_PAGE", 1) - create(:budget_investment, :selected, :with_map_location, + create( + :budget_investment, :selected, :with_map_location, heading: new_york, price: 10000, title: "More bridges", ) - create(:budget_investment, :selected, :with_map_location, + create( + :budget_investment, :selected, :with_map_location, heading: new_york, price: 5000, title: "Less bridges" diff --git a/spec/system/budgets/investments_spec.rb b/spec/system/budgets/investments_spec.rb index ee74fa7be..917b60f36 100644 --- a/spec/system/budgets/investments_spec.rb +++ b/spec/system/budgets/investments_spec.rb @@ -645,7 +645,7 @@ describe "Budget Investments" do visit new_budget_investment_path(budget) expect(page).to have_select "Heading", - options: ["", "More hospitals", "Medical supplies", "Even more hospitals"] + options: ["", "More hospitals", "Medical supplies", "Even more hospitals"] expect(page).not_to have_content "Health" end @@ -661,7 +661,7 @@ describe "Budget Investments" do expect(page).not_to have_content("#{heading.name} (#{budget.formatted_heading_price(heading)})") expect(page).to have_select "Heading", - options: ["", "Health: More hospitals", "Health: Medical supplies", "Education: Schools"] + options: ["", "Health: More hospitals", "Health: Medical supplies", "Education: Schools"] select "Health: Medical supplies", from: "Heading" @@ -987,11 +987,11 @@ describe "Budget Investments" do unfeasibility_explanation: "Local government is not competent in this") investment_2 = create(:budget_investment, - :unfeasible, - :finished, - budget: budget, - heading: heading, - unfeasibility_explanation: "The unfeasible explanation") + :unfeasible, + :finished, + budget: budget, + heading: heading, + unfeasibility_explanation: "The unfeasible explanation") user = create(:user) login_as(user) diff --git a/spec/system/comments/budget_investments_spec.rb b/spec/system/comments/budget_investments_spec.rb index c8df55a93..6f7c6e55d 100644 --- a/spec/system/comments/budget_investments_spec.rb +++ b/spec/system/comments/budget_investments_spec.rb @@ -469,9 +469,9 @@ describe "Commenting Budget::Investments" do manuela = create(:user, username: "Manuela") admin = create(:administrator, user: manuela) comment = create(:comment, - commentable: investment, - user: manuela, - administrator_id: admin.id) + commentable: investment, + user: manuela, + administrator_id: admin.id) visit budget_investment_path(investment.budget, investment) diff --git a/spec/system/dashboard/dashboard_spec.rb b/spec/system/dashboard/dashboard_spec.rb index 92721cccb..58b8f9d4f 100644 --- a/spec/system/dashboard/dashboard_spec.rb +++ b/spec/system/dashboard/dashboard_spec.rb @@ -25,9 +25,9 @@ describe "Proposal's dashboard" do scenario "Dashboard progress shows current goal" do goal = create(:dashboard_action, :resource, :active, - required_supports: proposal.votes_for.size + 1_000) + required_supports: proposal.votes_for.size + 1_000) future_goal = create(:dashboard_action, :resource, :active, - required_supports: proposal.votes_for.size + 2_000) + required_supports: proposal.votes_for.size + 2_000) visit progress_proposal_dashboard_path(proposal) @@ -58,10 +58,10 @@ describe "Proposal's dashboard" do scenario "Dashboard progress show proposed actions truncated description" do action = create(:dashboard_action, :proposed_action, :active, description: "One short action") action_long = create(:dashboard_action, :proposed_action, :active, - description: "This is a really very long description for a proposed "\ - "action on progress dashboard section, so this description "\ - "should be appear truncated and shows the show description "\ - "link to show the complete description to the users.") + description: "This is a really very long description for a proposed "\ + "action on progress dashboard section, so this description "\ + "should be appear truncated and shows the show description "\ + "link to show the complete description to the users.") visit progress_proposal_dashboard_path(proposal) @@ -165,7 +165,7 @@ describe "Proposal's dashboard" do _solved_task = create(:dashboard_administrator_task, :done, source: executed_solved_action) unavailable = create(:dashboard_action, :resource, :active, - required_supports: proposal.votes_for.size + 1_000) + required_supports: proposal.votes_for.size + 1_000) visit progress_proposal_dashboard_path(proposal) within "div#available-resources-section" do @@ -212,7 +212,7 @@ describe "Proposal's dashboard" do _solved_task = create(:dashboard_administrator_task, :done, source: executed_solved_action) unavailable = create(:dashboard_action, :resource, :active, - required_supports: proposal.votes_for.size + 1_000) + required_supports: proposal.votes_for.size + 1_000) visit progress_proposal_dashboard_path(proposal) within "div#available-resources-section" do @@ -245,8 +245,8 @@ describe "Proposal's dashboard" do scenario "Dashboard progress dont show resources with published_proposal: true" do available = create(:dashboard_action, :resource, :active, published_proposal: true) unavailable = create(:dashboard_action, :resource, :active, - required_supports: proposal.votes_for.size + 1_000, - published_proposal: true) + required_supports: proposal.votes_for.size + 1_000, + published_proposal: true) visit progress_proposal_dashboard_path(proposal) @@ -381,7 +381,7 @@ describe "Proposal's dashboard" do visit messages_proposal_dashboard_path(proposal) expect(page).to have_link("See previous notifications", href: proposal_path(proposal, - anchor: "tab-notifications")) + anchor: "tab-notifications")) end scenario "Dashboard has a related content section" do diff --git a/spec/system/home_spec.rb b/spec/system/home_spec.rb index 6a2a36456..f74659a07 100644 --- a/spec/system/home_spec.rb +++ b/spec/system/home_spec.rb @@ -157,7 +157,8 @@ describe "Home" do end scenario "if there are cards, the 'featured' title will render" do - create(:widget_card, + create( + :widget_card, title: "Card text", description: "Card description", link_text: "Link text", diff --git a/spec/system/legislation/summary_spec.rb b/spec/system/legislation/summary_spec.rb index 443649937..5bab2d84d 100644 --- a/spec/system/legislation/summary_spec.rb +++ b/spec/system/legislation/summary_spec.rb @@ -21,8 +21,8 @@ describe "Legislation" do scenario "empty process" do process = create(:legislation_process, :empty, - result_publication_enabled: true, - end_date: Date.current - 1.day + result_publication_enabled: true, + end_date: Date.current - 1.day ) visit summary_legislation_process_path(process) diff --git a/spec/system/moderation/budget_investments_spec.rb b/spec/system/moderation/budget_investments_spec.rb index 0ec232715..bf8ec87d1 100644 --- a/spec/system/moderation/budget_investments_spec.rb +++ b/spec/system/moderation/budget_investments_spec.rb @@ -197,21 +197,24 @@ describe "Moderate budget investments" do end scenario "sorting investments" do - flagged_investment = create(:budget_investment, + flagged_investment = create( + :budget_investment, heading: heading, title: "Flagged investment", created_at: 1.day.ago, flags_count: 5 ) - flagged_new_investment = create(:budget_investment, + flagged_new_investment = create( + :budget_investment, heading: heading, title: "Flagged new investment", created_at: 12.hours.ago, flags_count: 3 ) - latest_investment = create(:budget_investment, + latest_investment = create( + :budget_investment, heading: heading, title: "Latest investment", created_at: Time.current diff --git a/spec/system/officing/results_spec.rb b/spec/system/officing/results_spec.rb index 4ffe58cc4..7fa0d8926 100644 --- a/spec/system/officing/results_spec.rb +++ b/spec/system/officing/results_spec.rb @@ -80,14 +80,16 @@ describe "Officing Results", :with_frozen_time do end scenario "Edit result" do - partial_result = create(:poll_partial_result, - officer_assignment: poll_officer.officer_assignments.first, - booth_assignment: poll_officer.officer_assignments.first.booth_assignment, - date: Date.current, - question: question_1, - answer: question_1.question_answers.first.title, - author: poll_officer.user, - amount: 7777) + partial_result = create( + :poll_partial_result, + officer_assignment: poll_officer.officer_assignments.first, + booth_assignment: poll_officer.officer_assignments.first.booth_assignment, + date: Date.current, + question: question_1, + answer: question_1.question_answers.first.title, + author: poll_officer.user, + amount: 7777 + ) visit officing_poll_results_path(poll, date: I18n.l(partial_result.date), booth_assignment_id: partial_result.booth_assignment_id) @@ -129,20 +131,24 @@ describe "Officing Results", :with_frozen_time do booth_assignment = officer_assignment.booth_assignment booth = booth_assignment.booth - create(:poll_partial_result, + create( + :poll_partial_result, officer_assignment: officer_assignment, booth_assignment: booth_assignment, date: poll.ends_at, question: question_1, - amount: 33) + amount: 33 + ) - create(:poll_recount, + create( + :poll_recount, officer_assignment: officer_assignment, booth_assignment: booth_assignment, date: poll.ends_at, white_amount: 21, null_amount: 44, - total_amount: 66) + total_amount: 66 + ) visit officing_poll_results_path(poll, date: I18n.l(poll.ends_at.to_date), diff --git a/spec/system/proposal_notifications_spec.rb b/spec/system/proposal_notifications_spec.rb index d15889dcc..e3dba91ab 100644 --- a/spec/system/proposal_notifications_spec.rb +++ b/spec/system/proposal_notifications_spec.rb @@ -79,11 +79,11 @@ describe "Proposal Notifications" do proposal = create(:proposal) create(:proposal_notification, - proposal: proposal, title: "Hey guys", - body: "Just wanted to let you know that...") + proposal: proposal, title: "Hey guys", + body: "Just wanted to let you know that...") create(:proposal_notification, - proposal: proposal, title: "Another update", - body: "We are almost there please share with your peoples!") + proposal: proposal, title: "Another update", + body: "We are almost there please share with your peoples!") visit proposal_path(proposal) click_link "Notifications (2)" @@ -107,7 +107,7 @@ describe "Proposal Notifications" do expect(page).to have_content "This notification will be sent to 7 people and it will "\ "be visible in the proposal's page" expect(page).to have_link("the proposal's page", href: proposal_path(proposal, - anchor: "comments")) + anchor: "comments")) end scenario "Message about receivers (Disctinct Followers and Voters)" do @@ -123,7 +123,7 @@ describe "Proposal Notifications" do expect(page).to have_content "This notification will be sent to 7 people and it will "\ "be visible in the proposal's page" expect(page).to have_link("the proposal's page", href: proposal_path(proposal, - anchor: "comments")) + anchor: "comments")) end scenario "Message about receivers (Same Followers and Voters)" do @@ -138,7 +138,7 @@ describe "Proposal Notifications" do expect(page).to have_content "This notification will be sent to 1 people and it will "\ "be visible in the proposal's page" expect(page).to have_link("the proposal's page", href: proposal_path(proposal, - anchor: "comments")) + anchor: "comments")) end context "Permissions" do diff --git a/spec/system/proposals_spec.rb b/spec/system/proposals_spec.rb index bf0dcb2a9..5969d856a 100644 --- a/spec/system/proposals_spec.rb +++ b/spec/system/proposals_spec.rb @@ -1000,7 +1000,7 @@ describe "Proposals" do Setting["feature.featured_proposals"] = true featured_proposal = create(:proposal, :with_confidence_score, cached_votes_up: 100) archived_proposal = create(:proposal, :archived, :with_confidence_score, - cached_votes_up: 10000) + cached_votes_up: 10000) visit proposals_path diff --git a/spec/system/site_customization/custom_pages_spec.rb b/spec/system/site_customization/custom_pages_spec.rb index 138b4b0d5..e7586d939 100644 --- a/spec/system/site_customization/custom_pages_spec.rb +++ b/spec/system/site_customization/custom_pages_spec.rb @@ -4,7 +4,8 @@ describe "Custom Pages" do context "New custom page" do context "Published" do scenario "See page" do - custom_page = create(:site_customization_page, :published, + custom_page = create( + :site_customization_page, :published, slug: "other-slug", title_en: "Custom page", content_en: "Text for new custom page", @@ -20,7 +21,8 @@ describe "Custom Pages" do end scenario "Show all fields and text with links" do - custom_page = create(:site_customization_page, :published, + custom_page = create( + :site_customization_page, :published, slug: "slug-with-all-fields-filled", title_en: "Custom page", subtitle_en: "This is my new custom page", @@ -39,7 +41,8 @@ describe "Custom Pages" do end scenario "Don't show subtitle if its blank" do - custom_page = create(:site_customization_page, :published, + custom_page = create( + :site_customization_page, :published, slug: "slug-without-subtitle", title_en: "Custom page", subtitle_en: "", @@ -57,7 +60,8 @@ describe "Custom Pages" do end scenario "Listed in more information page" do - create(:site_customization_page, :published, + create( + :site_customization_page, :published, slug: "another-slug", title_en: "Another custom page", subtitle_en: "Subtitle for custom page", @@ -70,7 +74,8 @@ describe "Custom Pages" do end scenario "Not listed in more information page" do - custom_page = create(:site_customization_page, :published, + custom_page = create( + :site_customization_page, :published, slug: "another-slug", title_en: "Another custom page", subtitle_en: "Subtitle for custom page", more_info_flag: false diff --git a/spec/system/verification/residence_spec.rb b/spec/system/verification/residence_spec.rb index 22ad66d11..c54e44fee 100644 --- a/spec/system/verification/residence_spec.rb +++ b/spec/system/verification/residence_spec.rb @@ -48,9 +48,9 @@ describe "Residence" do click_link "Verify my account" expect(page).to have_select("residence_date_of_birth_1i", - with_options: [min_age.years.ago.year]) + with_options: [min_age.years.ago.year]) expect(page).not_to have_select("residence_date_of_birth_1i", - with_options: [underage.years.ago.year]) + with_options: [underage.years.ago.year]) end scenario "When trying to verify a deregistered account old votes are reassigned" do
    <% unless @poll.expired? %> - <%= render Admin::TableActionsComponent.new(booth_assignment, + <%= render Admin::TableActionsComponent.new( + booth_assignment, actions: [:destroy], destroy_text: t("admin.booth_assignments.manage.actions.unassign"), destroy_confirmation: (booth_assignment.shifts? ? t("admin.poll_booth_assignments.alert.shifts") : ""), diff --git a/app/views/admin/poll/polls/_poll.html.erb b/app/views/admin/poll/polls/_poll.html.erb index 80b64d43c..9d692b867 100644 --- a/app/views/admin/poll/polls/_poll.html.erb +++ b/app/views/admin/poll/polls/_poll.html.erb @@ -7,7 +7,8 @@ <%= poll.sdg_target_list %> - <%= render Admin::TableActionsComponent.new(poll, + <%= render Admin::TableActionsComponent.new( + poll, destroy_confirmation: t("admin.polls.destroy.alert") ) do |actions| %> <%= actions.action(:configure) %> diff --git a/app/views/admin/poll/questions/answers/_form.html.erb b/app/views/admin/poll/questions/answers/_form.html.erb index ef32b93e5..7ecc89c8c 100644 --- a/app/views/admin/poll/questions/answers/_form.html.erb +++ b/app/views/admin/poll/questions/answers/_form.html.erb @@ -5,7 +5,7 @@ <%= render "shared/errors", resource: @answer %> <%= f.hidden_field :given_order, - value: @answer.persisted? ? @answer.given_order : @answer.class.last_position(@answer.question_id || @question.id) + 1 %> + value: @answer.persisted? ? @answer.given_order : @answer.class.last_position(@answer.question_id || @question.id) + 1 %>
    <%= f.translatable_fields do |translations_form| %> diff --git a/app/views/admin/poll/shifts/_form.html.erb b/app/views/admin/poll/shifts/_form.html.erb index c60458759..2c0fc6249 100644 --- a/app/views/admin/poll/shifts/_form.html.erb +++ b/app/views/admin/poll/shifts/_form.html.erb @@ -14,29 +14,29 @@
    <%= f.select :task, - Poll::Shift.tasks.map { |k, v| [t("admin.poll_shifts.#{k}"), k] }, - { prompt: t("admin.poll_shifts.new.select_task") }, - class: "js-poll-shifts" %> + Poll::Shift.tasks.map { |k, v| [t("admin.poll_shifts.#{k}"), k] }, + { prompt: t("admin.poll_shifts.new.select_task") }, + class: "js-poll-shifts" %>
    <%= select "shift[date]", "vote_collection_date", - options_for_select(shift_vote_collection_dates(@booth, @voting_polls)), - { prompt: @voting_polls.present? ? t("admin.poll_shifts.new.select_date") : t("admin.poll_shifts.new.no_voting_days") }, - class: "js-shift-vote-collection-dates" %> + options_for_select(shift_vote_collection_dates(@booth, @voting_polls)), + { prompt: @voting_polls.present? ? t("admin.poll_shifts.new.select_date") : t("admin.poll_shifts.new.no_voting_days") }, + class: "js-shift-vote-collection-dates" %> <%= select "shift[date]", "recount_scrutiny_date", - options_for_select(shift_recount_scrutiny_dates(@booth, @recount_polls)), - { prompt: t("admin.poll_shifts.new.select_date") }, - class: "js-shift-recount-scrutiny-dates", - hidden: "hidden" %> + options_for_select(shift_recount_scrutiny_dates(@booth, @recount_polls)), + { prompt: t("admin.poll_shifts.new.select_date") }, + class: "js-shift-recount-scrutiny-dates", + hidden: "hidden" %>
    <%= f.hidden_field :booth_id, value: @booth.id %>
    <%= f.submit t("admin.poll_shifts.new.add_shift"), - class: "button expanded margin-top" %> + class: "button expanded margin-top" %>
    <% end %> diff --git a/app/views/admin/poll/shifts/_search_officers.html.erb b/app/views/admin/poll/shifts/_search_officers.html.erb index e95090f9c..4a601c852 100644 --- a/app/views/admin/poll/shifts/_search_officers.html.erb +++ b/app/views/admin/poll/shifts/_search_officers.html.erb @@ -3,9 +3,9 @@ method: :get, remote: true do |f| %>
    <%= text_field_tag :search, - @search, - placeholder: t("admin.poll_shifts.new.search_officer_placeholder"), - id: "search-officers" %> + @search, + placeholder: t("admin.poll_shifts.new.search_officer_placeholder"), + id: "search-officers" %>
    <%= submit_tag t("admin.poll_shifts.new.search_officer_button"), class: "button" %> diff --git a/app/views/admin/poll/shifts/_shifts.html.erb b/app/views/admin/poll/shifts/_shifts.html.erb index d3cda31fb..c8d884b6d 100644 --- a/app/views/admin/poll/shifts/_shifts.html.erb +++ b/app/views/admin/poll/shifts/_shifts.html.erb @@ -17,7 +17,8 @@
    <%= shift.officer_email %> <%= t("admin.poll_shifts.#{shift.task}") %> - <%= render Admin::TableActionsComponent.new(shift, + <%= render Admin::TableActionsComponent.new( + shift, actions: [:destroy], destroy_text: t("admin.poll_shifts.new.remove_shift") ) %> diff --git a/app/views/admin/settings/_content_types_settings_form.html.erb b/app/views/admin/settings/_content_types_settings_form.html.erb index 4c3cb347b..458f9d8e8 100644 --- a/app/views/admin/settings/_content_types_settings_form.html.erb +++ b/app/views/admin/settings/_content_types_settings_form.html.erb @@ -6,8 +6,8 @@ <% Setting.mime_types[group].each do |content_type, mime_type_value| %> <%= check_box_tag content_type, - setting.value.split.include?(mime_type_value), - setting.value.split.include?(mime_type_value) %> + setting.value.split.include?(mime_type_value), + setting.value.split.include?(mime_type_value) %> <%= label_tag content_type, content_type.upcase %> <% end %> diff --git a/app/views/admin/settings/_map_form.html.erb b/app/views/admin/settings/_map_form.html.erb index 8c85666f7..c71b412a0 100644 --- a/app/views/admin/settings/_map_form.html.erb +++ b/app/views/admin/settings/_map_form.html.erb @@ -23,7 +23,7 @@
    <%= submit_tag t("admin.settings.index.map.form.submit"), - class: "button hollow expanded" %> + class: "button hollow expanded" %>
    <% end %> diff --git a/app/views/admin/settings/_settings_form.html.erb b/app/views/admin/settings/_settings_form.html.erb index 33e9ab8f1..464713004 100644 --- a/app/views/admin/settings/_settings_form.html.erb +++ b/app/views/admin/settings/_settings_form.html.erb @@ -2,10 +2,10 @@ <%= f.hidden_field :tab, id: dom_id(setting, :tab), value: tab if defined?(tab) %>
    <%= f.text_area :value, - label: false, - id: dom_id(setting, :value), - "aria-label": strip_tags(t("settings.#{setting.key}")), - "aria-describedby": dom_id(setting, :description) %> + label: false, + id: dom_id(setting, :value), + "aria-label": strip_tags(t("settings.#{setting.key}")), + "aria-describedby": dom_id(setting, :description) %>
    <%= f.submit(t("admin.settings.index.update_setting"), class: "button hollow expanded") %> diff --git a/app/views/admin/shared/_budget_investment_search.html.erb b/app/views/admin/shared/_budget_investment_search.html.erb index 86f77dfc5..7e9d3d082 100644 --- a/app/views/admin/shared/_budget_investment_search.html.erb +++ b/app/views/admin/shared/_budget_investment_search.html.erb @@ -5,9 +5,9 @@
    <%= select_tag :heading_id, - options_for_select(budget_heading_select_options(@budget), - params[:heading_id]), - include_blank: true %> + options_for_select(budget_heading_select_options(@budget), + params[:heading_id]), + include_blank: true %>
    diff --git a/app/views/admin/signature_sheets/new.html.erb b/app/views/admin/signature_sheets/new.html.erb index 5dd736d17..70ab8ab49 100644 --- a/app/views/admin/signature_sheets/new.html.erb +++ b/app/views/admin/signature_sheets/new.html.erb @@ -4,7 +4,7 @@ <%= form_for [:admin, @signature_sheet] do |f| %> <%= render "shared/errors", - resource: @signature_sheet %> + resource: @signature_sheet %>
    <%= f.text_field :title %> diff --git a/app/views/admin/signature_sheets/show.html.erb b/app/views/admin/signature_sheets/show.html.erb index 1b235ae2c..b4446c77e 100644 --- a/app/views/admin/signature_sheets/show.html.erb +++ b/app/views/admin/signature_sheets/show.html.erb @@ -21,12 +21,12 @@
    <%= t("admin.signature_sheets.show.verified", - count: @signature_sheet.signatures.verified.count) %> + count: @signature_sheet.signatures.verified.count) %>
    <%= t("admin.signature_sheets.show.voted", - count: @voted_signatures) %> + count: @voted_signatures) %>
    @@ -35,7 +35,7 @@

    <%= t("admin.signature_sheets.show.unverified", - count: @signature_sheet.signatures.unverified.count) %> + count: @signature_sheet.signatures.unverified.count) %> <%= t("admin.signature_sheets.show.unverified_error") %>

    diff --git a/app/views/admin/site_customization/information_texts/_globalize_locales.html.erb b/app/views/admin/site_customization/information_texts/_globalize_locales.html.erb index ef93a7ae7..da4297ad1 100644 --- a/app/views/admin/site_customization/information_texts/_globalize_locales.html.erb +++ b/app/views/admin/site_customization/information_texts/_globalize_locales.html.erb @@ -1,4 +1,4 @@ <%= render "shared/common_globalize_locales", - resource: nil, - display_style: lambda { |locale| site_customization_display_translation_style(locale) }, - manage_languages: defined?(manage_languages) ? manage_languages : true %> + resource: nil, + display_style: lambda { |locale| site_customization_display_translation_style(locale) }, + manage_languages: defined?(manage_languages) ? manage_languages : true %> diff --git a/app/views/admin/stats/show.html.erb b/app/views/admin/stats/show.html.erb index 8a633637c..f5fa82d3c 100644 --- a/app/views/admin/stats/show.html.erb +++ b/app/views/admin/stats/show.html.erb @@ -13,9 +13,9 @@ <%= link_to t("admin.stats.show.proposal_notifications"), proposal_notifications_admin_stats_path, class: "button hollow" %> <%= link_to t("admin.stats.show.incomplete_verifications"), - admin_verifications_path, class: "button hollow" %> + admin_verifications_path, class: "button hollow" %> <%= link_to t("admin.stats.show.sdg"), - sdg_admin_stats_path, class: "button hollow" if feature?(:sdg) %> + sdg_admin_stats_path, class: "button hollow" if feature?(:sdg) %>
    diff --git a/app/views/admin/system_emails/preview_pending/_proposal_notification_digest.html.erb b/app/views/admin/system_emails/preview_pending/_proposal_notification_digest.html.erb index 2d86e0812..fa02ac0a5 100644 --- a/app/views/admin/system_emails/preview_pending/_proposal_notification_digest.html.erb +++ b/app/views/admin/system_emails/preview_pending/_proposal_notification_digest.html.erb @@ -31,10 +31,10 @@
    <%= link_to t("admin.system_emails.preview_pending.moderate_pending"), - admin_system_email_moderate_pending_path(system_email_id: "proposal_notification_digest", - id: preview.id), - method: :put, - class: "button hollow float-right" %> + admin_system_email_moderate_pending_path(system_email_id: "proposal_notification_digest", + id: preview.id), + method: :put, + class: "button hollow float-right" %>
    <% end %> diff --git a/app/views/admin/tags/index.html.erb b/app/views/admin/tags/index.html.erb index 39583f933..8c0262f08 100644 --- a/app/views/admin/tags/index.html.erb +++ b/app/views/admin/tags/index.html.erb @@ -22,11 +22,11 @@
    <%= form_for(tag, - url: admin_tag_path(tag), - as: :tag, - html: { id: "edit_tag_#{tag.id}" }) do |f| %> + url: admin_tag_path(tag), + as: :tag, + html: { id: "edit_tag_#{tag.id}" }) do |f| %> - <%= tag.name %> + <%= tag.name %> <% end %> diff --git a/app/views/budgets/executions/show.html.erb b/app/views/budgets/executions/show.html.erb index acb4f3822..dcbfe24f6 100644 --- a/app/views/budgets/executions/show.html.erb +++ b/app/views/budgets/executions/show.html.erb @@ -2,9 +2,9 @@ <% content_for :meta_description do %><%= @budget.description_for_phase("finished") %><% end %> <% provide :social_media_meta_tags do %> <%= render "shared/social_media_meta_tags", - social_url: budget_executions_url(@budget), - social_title: @budget.name, - social_description: @budget.description_for_phase("finished") %> + social_url: budget_executions_url(@budget), + social_title: @budget.name, + social_description: @budget.description_for_phase("finished") %> <% end %> <% content_for :canonical do %> diff --git a/app/views/budgets/investments/_header.html.erb b/app/views/budgets/investments/_header.html.erb index 5f1ab18b8..cd30b56b1 100644 --- a/app/views/budgets/investments/_header.html.erb +++ b/app/views/budgets/investments/_header.html.erb @@ -37,12 +37,12 @@
    <%= sanitize(t("budgets.investments.header.different_heading_assigned", - heading_link: heading_link(@assigned_heading, @budget))) %> + heading_link: heading_link(@assigned_heading, @budget))) %>
    <%= sanitize(t("budgets.investments.header.change_ballot", - check_ballot: link_to(t("budgets.investments.header.check_ballot_link"), - budget_ballot_path(@budget)))) %> + check_ballot: link_to(t("budgets.investments.header.check_ballot_link"), + budget_ballot_path(@budget)))) %>
    diff --git a/app/views/budgets/investments/_investment.html.erb b/app/views/budgets/investments/_investment.html.erb index 1a4009952..2f67a5a9a 100644 --- a/app/views/budgets/investments/_investment.html.erb +++ b/app/views/budgets/investments/_investment.html.erb @@ -42,7 +42,7 @@
    <%= t("budgets.investments.investment.supports", - count: investment.total_votes) %> + count: investment.total_votes) %>
    @@ -50,9 +50,9 @@
    <%= render "/budgets/investments/ballot", - investment: investment, - investment_ids: investment_ids, - ballot: ballot %> + investment: investment, + investment_ids: investment_ids, + ballot: ballot %>
    <% elsif investment.should_show_price? %>
    <%= render "documents/documents", - documents: investment.documents, - max_documents_allowed: Budget::Investment.max_documents_allowed %> + documents: investment.documents, + max_documents_allowed: Budget::Investment.max_documents_allowed %> <% end %> <%= render "shared/tags", taggable: investment %> diff --git a/app/views/budgets/investments/_investment_show.html.erb b/app/views/budgets/investments/_investment_show.html.erb index aec6ec3b5..10e1fd18c 100644 --- a/app/views/budgets/investments/_investment_show.html.erb +++ b/app/views/budgets/investments/_investment_show.html.erb @@ -1,10 +1,10 @@ <% provide :social_media_meta_tags do %> <%= render "shared/social_media_meta_tags", - social_url: budget_investments_path(investment), - social_title: investment.title, - social_description: investment.description, - twitter_image_url: (investment.image.present? ? polymorphic_path(investment.image.variant(:thumb)) : nil), - og_image_url: (investment.image.present? ? polymorphic_path(investment.image.variant(:thumb)) : nil) %> + social_url: budget_investments_path(investment), + social_title: investment.title, + social_description: investment.description, + twitter_image_url: (investment.image.present? ? polymorphic_path(investment.image.variant(:thumb)) : nil), + og_image_url: (investment.image.present? ? polymorphic_path(investment.image.variant(:thumb)) : nil) %> <% end %>
    @@ -39,7 +39,7 @@ <%= t("budgets.investments.investment.supports", - count: investment.total_votes) %> + count: investment.total_votes) %>
    @@ -49,9 +49,9 @@
    <%= render "ballot", - investment: investment, - investment_ids: investment_ids, - ballot: ballot %> + investment: investment, + investment_ids: investment_ids, + ballot: ballot %>
    <% end %> @@ -93,22 +93,23 @@ <% if investment.should_show_price_explanation? %>
    <%= link_to t("budgets.investments.show.see_price_explanation"), - "#price_explanation", class: "small" %> + "#price_explanation", + class: "small" %>
    <% end %> <% end %> <%= render "shared/social_share", - share_title: t("budgets.investments.show.share"), - title: investment.title, - image_url: image_absolute_url(investment.image, :thumb), - url: budget_investment_url(investment.budget, investment), - description: t("budgets.investments.share.message", - title: investment.title, - handle: setting["org_name"]), - mobile: t("budgets.investments.share.message", - title: investment.title, - handle: setting["twitter_handle"]) %> + share_title: t("budgets.investments.show.share"), + title: investment.title, + image_url: image_absolute_url(investment.image, :thumb), + url: budget_investment_url(investment.budget, investment), + description: t("budgets.investments.share.message", + title: investment.title, + handle: setting["org_name"]), + mobile: t("budgets.investments.share.message", + title: investment.title, + handle: setting["twitter_handle"]) %> <% if current_user %> diff --git a/app/views/budgets/investments/_sidebar.html.erb b/app/views/budgets/investments/_sidebar.html.erb index 9aba3eeb1..a822c2efd 100644 --- a/app/views/budgets/investments/_sidebar.html.erb +++ b/app/views/budgets/investments/_sidebar.html.erb @@ -3,11 +3,12 @@ <% if can?(:create, Budget::Investment.new(budget: @budget)) %> <% if current_user && current_user.level_two_or_three_verified? %> <%= link_to t("budgets.investments.index.sidebar.create"), - new_budget_investment_path(budget_id: @budget.id), class: "button budget expanded" %> + new_budget_investment_path(budget_id: @budget.id), + class: "button budget expanded" %> <% else %>
    <%= sanitize(t("budgets.investments.index.sidebar.verified_only", - verify: link_to_verify_account)) %> + verify: link_to_verify_account)) %>
    <% end %> <% end %> diff --git a/app/views/budgets/investments/index.html.erb b/app/views/budgets/investments/index.html.erb index 99e47d0c9..08a481d6d 100644 --- a/app/views/budgets/investments/index.html.erb +++ b/app/views/budgets/investments/index.html.erb @@ -7,9 +7,9 @@ <% content_for :canonical do %> <% if @heading.present? %> <%= render "shared/canonical", - href: budget_investments_url(@budget, - heading_id: @heading.id, - filter: @current_filter) %> + href: budget_investments_url(@budget, + heading_id: @heading.id, + filter: @current_filter) %> <% else %> <%= render "shared/canonical", href: budget_investments_url(@budget) %> <% end %> diff --git a/app/views/budgets/investments/show.html.erb b/app/views/budgets/investments/show.html.erb index 042e70d46..d3e4cdb8d 100644 --- a/app/views/budgets/investments/show.html.erb +++ b/app/views/budgets/investments/show.html.erb @@ -4,9 +4,9 @@ <% end %> <%= render "/budgets/investments/investment_show", - investment: @investment, - investment_ids: @investment_ids, - ballot: @ballot %> + investment: @investment, + investment_ids: @investment_ids, + ballot: @ballot %>
    diff --git a/app/views/budgets/results/show.html.erb b/app/views/budgets/results/show.html.erb index 605309c1b..aedae4faf 100644 --- a/app/views/budgets/results/show.html.erb +++ b/app/views/budgets/results/show.html.erb @@ -2,9 +2,9 @@ <% content_for :meta_description do %><%= @budget.description_for_phase("finished") %><% end %> <% provide :social_media_meta_tags do %> <%= render "shared/social_media_meta_tags", - social_url: budget_results_url(@budget), - social_title: @budget.name, - social_description: @budget.description_for_phase("finished") %> + social_url: budget_results_url(@budget), + social_title: @budget.name, + social_description: @budget.description_for_phase("finished") %> <% end %> <% content_for :canonical do %> <%= render "shared/canonical", href: budget_results_url(@budget) %> diff --git a/app/views/budgets/stats/show.html.erb b/app/views/budgets/stats/show.html.erb index 5ad9e09ba..be60f24c4 100644 --- a/app/views/budgets/stats/show.html.erb +++ b/app/views/budgets/stats/show.html.erb @@ -3,9 +3,9 @@ <% end %> <% provide :social_media_meta_tags do %> <%= render "shared/social_media_meta_tags", - social_url: budget_stats_url(@budget), - social_title: @budget.name, - social_description: @budget.description_for_phase("finished") %> + social_url: budget_stats_url(@budget), + social_title: @budget.name, + social_description: @budget.description_for_phase("finished") %> <% end %>
    diff --git a/app/views/comments/_form.html.erb b/app/views/comments/_form.html.erb index 41b5e61eb..17813cace 100644 --- a/app/views/comments/_form.html.erb +++ b/app/views/comments/_form.html.erb @@ -4,9 +4,9 @@
    <%= form_for Comment.new, remote: true, html: { id: "new_comment_#{css_id}" } do |f| %> <%= f.text_area :body, - id: "comment-body-#{css_id}", - maxlength: Comment.body_max_length, - label: leave_comment_text(commentable) %> + id: "comment-body-#{css_id}", + maxlength: Comment.body_max_length, + label: leave_comment_text(commentable) %> <%= f.hidden_field :commentable_type, value: commentable.class.name, id: "comment_commentable_type_#{css_id}" %> <%= f.hidden_field :commentable_id, value: commentable.id, id: "comment_commentable_id_#{css_id}" %> @@ -18,15 +18,15 @@ <% if can? :comment_as_moderator, commentable %>
    <%= f.check_box :as_moderator, - label: t("comments.form.comment_as_moderator"), - id: "comment-as-moderator-#{css_id}" %> + label: t("comments.form.comment_as_moderator"), + id: "comment-as-moderator-#{css_id}" %>
    <% end %> <% if can? :comment_as_administrator, commentable %>
    <%= f.check_box :as_administrator, - label: t("comments.form.comment_as_admin"), - id: "comment-as-administrator-#{css_id}" %> + label: t("comments.form.comment_as_admin"), + id: "comment-as-administrator-#{css_id}" %>
    <% end %> diff --git a/app/views/communities/_poll.html.erb b/app/views/communities/_poll.html.erb index 22825a981..52bfe6764 100644 --- a/app/views/communities/_poll.html.erb +++ b/app/views/communities/_poll.html.erb @@ -5,6 +5,7 @@

    <%= t("communities.poll.take_part", - from: l(poll.starts_at.to_date), to: l(poll.ends_at.to_date)) %> + from: l(poll.starts_at.to_date), + to: l(poll.ends_at.to_date)) %>

    diff --git a/app/views/dashboard/_goal.html.erb b/app/views/dashboard/_goal.html.erb index b100e1952..2c51072aa 100644 --- a/app/views/dashboard/_goal.html.erb +++ b/app/views/dashboard/_goal.html.erb @@ -2,8 +2,8 @@
    <%= t("dashboard.goal.target_supports", - count: number_with_precision(goal.required_supports, - delimiter: ".", precision: 0)) %> + count: number_with_precision(goal.required_supports, + delimiter: ".", precision: 0)) %>
    diff --git a/app/views/dashboard/_mailing_resource.html.erb b/app/views/dashboard/_mailing_resource.html.erb index ed85a5642..2ec0beb40 100644 --- a/app/views/dashboard/_mailing_resource.html.erb +++ b/app/views/dashboard/_mailing_resource.html.erb @@ -8,8 +8,8 @@
    <%= link_to t("dashboard.resource.view_resource"), - new_proposal_dashboard_mailing_path(proposal.to_param), - class: "button expanded" %> + new_proposal_dashboard_mailing_path(proposal.to_param), + class: "button expanded" %>
    diff --git a/app/views/dashboard/_poll_resource.html.erb b/app/views/dashboard/_poll_resource.html.erb index 5a02a4466..39d21ea8e 100644 --- a/app/views/dashboard/_poll_resource.html.erb +++ b/app/views/dashboard/_poll_resource.html.erb @@ -8,8 +8,8 @@
    <%= link_to t("dashboard.resource.view_resource"), - proposal_dashboard_polls_path(proposal.to_param), - class: "button expanded" %> + proposal_dashboard_polls_path(proposal.to_param), + class: "button expanded" %>
    diff --git a/app/views/dashboard/_poster_resource.html.erb b/app/views/dashboard/_poster_resource.html.erb index 85f2c27bf..0f47d6c32 100644 --- a/app/views/dashboard/_poster_resource.html.erb +++ b/app/views/dashboard/_poster_resource.html.erb @@ -8,8 +8,8 @@
    <%= link_to t("dashboard.resource.view_resource"), - new_proposal_dashboard_poster_path(proposal.to_param), - class: "button expanded" %> + new_proposal_dashboard_poster_path(proposal.to_param), + class: "button expanded" %>
    diff --git a/app/views/dashboard/community.html.erb b/app/views/dashboard/community.html.erb index b23137339..cdf57a365 100644 --- a/app/views/dashboard/community.html.erb +++ b/app/views/dashboard/community.html.erb @@ -9,7 +9,7 @@ <% if proposal.community.latest_activity.present? %>

    <%= t("dashboard.community.latest_activity", - at: l(proposal.community.latest_activity.to_date)) %> + at: l(proposal.community.latest_activity.to_date)) %>

    <% end %> diff --git a/app/views/dashboard/mailer/new_actions_notification_on_published.html.erb b/app/views/dashboard/mailer/new_actions_notification_on_published.html.erb index 46d39c5ba..287899d12 100644 --- a/app/views/dashboard/mailer/new_actions_notification_on_published.html.erb +++ b/app/views/dashboard/mailer/new_actions_notification_on_published.html.erb @@ -3,8 +3,8 @@

    <%= t("mailers.new_actions_notification_on_published.hi", - name: @proposal.author.name, - title: @proposal.title) %> + name: @proposal.author.name, + title: @proposal.title) %>

    <%= t("mailers.new_actions_notification_on_published.text_1") %> @@ -49,11 +49,11 @@

    <%= link_to progress_proposal_dashboard_url(@proposal), - style: "font-family: 'Open Sans',arial,sans-serif; background: #3700fd; - border-radius: 6px; color: #fff !important; font-weight: bold; - padding: 17px 20px; text-align: center; text-decoration: none; - font-size: 20px; min-width: 200px; display: inline-block;", - target: "_blank" do %> + style: "font-family: 'Open Sans',arial,sans-serif; background: #3700fd;" \ + "border-radius: 6px; color: #fff !important; font-weight: bold;" \ + "padding: 17px 20px; text-align: center; text-decoration: none;" \ + "font-size: 20px; min-width: 200px; display: inline-block;", + target: "_blank" do %> <%= t("mailers.new_actions_notification_on_published.dashboard_button") %> <% end %> <%= link_to user_url(@direct_message.sender), style: css_for_mailer_button, target: "_blank" do %> <%= t("mailers.direct_message_for_receiver.reply", - sender: @direct_message.sender.name) %> + sender: @direct_message.sender.name) %> <% end %>

    - <%= t("mailers.user_invite.title", - org: Setting["org_name"]) %> + <%= t("mailers.user_invite.title", org: Setting["org_name"]) %>

    - <%= t("mailers.user_invite.text", - org: Setting["org_name"]) %> + <%= t("mailers.user_invite.text", org: Setting["org_name"]) %>

    diff --git a/app/views/management/_account_info.html.erb b/app/views/management/_account_info.html.erb index cb262a9ef..ab37d813b 100644 --- a/app/views/management/_account_info.html.erb +++ b/app/views/management/_account_info.html.erb @@ -1,9 +1,9 @@ <% if managed_user.document_number.present? %>

    <%= link_to t("officing.poll_budgets.index.ballot_sheet", id: ballot_sheet.id), - officing_poll_ballot_sheet_path(@poll.id, ballot_sheet.id) %> <%= ballot_sheet.author %> <%= l(ballot_sheet.created_at, format: :long) %>