From 040c0184a4455f713277fd2d97dd964b067f832a Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Wed, 27 Mar 2019 10:03:56 +0100 Subject: [PATCH] erblint: use hash rocket syntax --- .erb-lint.yml | 2 -- app/views/issues/_comments.html.erb | 2 +- app/views/issues/index.html.erb | 2 +- app/views/issues/show.html.erb | 6 +++--- app/views/layouts/_search.html.erb | 4 ++-- app/views/layouts/notifier.html.erb | 2 +- app/views/notifier/_message_body.html.erb | 10 +++++----- app/views/reports/new.html.erb | 2 +- 8 files changed, 14 insertions(+), 16 deletions(-) diff --git a/.erb-lint.yml b/.erb-lint.yml index 29057feb2..09e737b91 100644 --- a/.erb-lint.yml +++ b/.erb-lint.yml @@ -43,8 +43,6 @@ linters: Enabled: false # TODO Rails/LinkToBlank: Enabled: false # TODO - Style/HashSyntax: - Enabled: false # TODO Style/SymbolProc: Enabled: false # TODO Style/Not: diff --git a/app/views/issues/_comments.html.erb b/app/views/issues/_comments.html.erb index 5cb99f2f1..08adfde53 100644 --- a/app/views/issues/_comments.html.erb +++ b/app/views/issues/_comments.html.erb @@ -15,7 +15,7 @@
- <%= form_for @new_comment, url: issue_comments_path(@issue) do |f| %> + <%= form_for @new_comment, :url => issue_comments_path(@issue) do |f| %> <%= richtext_area :issue_comment, :body, :cols => 10, :rows => 8, :required => true %> <%= label_tag :reassign, t('.reassign_param') %> <%= check_box_tag :reassign, true %>
diff --git a/app/views/issues/index.html.erb b/app/views/issues/index.html.erb index 959063231..26833553f 100644 --- a/app/views/issues/index.html.erb +++ b/app/views/issues/index.html.erb @@ -6,7 +6,7 @@

<%= t ".search_guidance" %>

<%= select_tag :status, options_for_select(Issue.aasm.states.map(&:name).map { |state| [t(".states.#{state}"), state] }, params[:status]), :include_blank => t(".select_status"), :data => { :behavior => 'category_dropdown' } %> <%= select_tag :issue_type, options_for_select(@issue_types, params[:issue_type]), :include_blank => t(".select_type"), :data => { :behavior => 'category_dropdown' } %> -<%= text_field_tag :search_by_user, params[:search_by_user], placeholder: t(".reported_user") %> +<%= text_field_tag :search_by_user, params[:search_by_user], :placeholder => t(".reported_user") %> <%= select_tag :last_updated_by, options_for_select(@users.all.collect { |f| [f.display_name, f.id] } << [t(".not_updated"), "nil"], params[:last_updated_by]), :include_blank => t(".select_last_updated_by"), :data => { :behavior => 'category_dropdown' } %> <%= submit_tag t(".search"), :name => nil %> <% end %> diff --git a/app/views/issues/show.html.erb b/app/views/issues/show.html.erb index e8cfafb45..3af1c402d 100644 --- a/app/views/issues/show.html.erb +++ b/app/views/issues/show.html.erb @@ -27,14 +27,14 @@ <% if @read_reports.present? %>

<%= t ".read_reports" %>

- <%= render 'reports', reports: @read_reports %> + <%= render 'reports', :reports => @read_reports %>
<% end %> <% if @unread_reports.any? %>

<%= t ".new_reports" %>

- <%= render 'reports', reports: @unread_reports %> + <%= render 'reports', :reports => @unread_reports %>
<% end %>
@@ -59,4 +59,4 @@

<%= t ".comments_on_this_issue" %>

-<%= render 'comments', comments: @comments %> +<%= render 'comments', :comments => @comments %> diff --git a/app/views/layouts/_search.html.erb b/app/views/layouts/_search.html.erb index 36614fd56..115a6bac7 100644 --- a/app/views/layouts/_search.html.erb +++ b/app/views/layouts/_search.html.erb @@ -1,7 +1,7 @@
<%= link_to image_tag('directions.png', :class => 'button'), directions_path, { :class => "button switch_link", :title => t('site.search.get_directions_title') } %> - <%= submit_tag t('site.search.submit_text'), :class => 'float', :data => { disable_with: false } %> + <%= submit_tag t('site.search.submit_text'), :class => 'float', :data => { :disable_with => false } %>
<%= text_field_tag "query", params[:query], :placeholder => t("site.search.search"), :autofocus => autofocus, :class => 'overflow' %> <%= link_to t('site.search.where_am_i'), '#', { :class => "describe_location", :title => t('site.search.where_am_i_title') } %> @@ -21,7 +21,7 @@
- <%= submit_tag t('site.search.submit_text'), :class => "routing_go", :data => { disable_with: false } %> + <%= submit_tag t('site.search.submit_text'), :class => "routing_go", :data => { :disable_with => false } %>
<%= t('site.search.reverse_directions_text') %> diff --git a/app/views/layouts/notifier.html.erb b/app/views/layouts/notifier.html.erb index 883f1b385..21b4e35ce 100644 --- a/app/views/layouts/notifier.html.erb +++ b/app/views/layouts/notifier.html.erb @@ -12,7 +12,7 @@ - <%= image_tag attachments["logo.png"].url, alt: "OpenStreetMap", title: "OpenStreetMap", height: "30", width: "30", border: "0" %> + <%= image_tag attachments["logo.png"].url, :alt => "OpenStreetMap", :title => "OpenStreetMap", :height => "30", :width => "30", :border => "0" %> <%# the "width: 100%" here looks wrong, but I couldn't find a better way of making Outlook give this cell full width %> diff --git a/app/views/notifier/_message_body.html.erb b/app/views/notifier/_message_body.html.erb index b3b0eb687..29bd3e063 100644 --- a/app/views/notifier/_message_body.html.erb +++ b/app/views/notifier/_message_body.html.erb @@ -4,11 +4,11 @@ <%= link_to( image_tag( attachments["avatar.png"].url, - alt: @author, - title: @author, - width: 50, - height: 50, - border: 0 + :alt => @author, + :title => @author, + :width => 50, + :height => 50, + :border => 0 ), user_url(@author), :target => "_blank" diff --git a/app/views/reports/new.html.erb b/app/views/reports/new.html.erb index fb338b497..1d83a3a59 100644 --- a/app/views/reports/new.html.erb +++ b/app/views/reports/new.html.erb @@ -32,7 +32,7 @@
- <%= text_area :report, :details, :cols => 20, :rows => 5, placeholder: t('.details') %> + <%= text_area :report, :details, :cols => 20, :rows => 5, :placeholder => t('.details') %>
-- 2.39.5