erblint: use parentheses for nested function calls
authorTom Hughes <tom@compton.nu>
Wed, 27 Mar 2019 18:55:48 +0000 (18:55 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 27 Mar 2019 18:55:48 +0000 (18:55 +0000)
.erb-lint.yml
app/views/browse/new_note.html.erb
app/views/browse/query.html.erb
app/views/diary_entries/_diary_entry.html.erb
app/views/geocoder/search.html.erb
app/views/messages/inbox.html.erb
app/views/messages/new.html.erb
app/views/messages/outbox.html.erb
app/views/users/new.html.erb
app/views/users/show.html.erb

index 7ac88e42fcc4faf2da63c3fbc71cc5695ccc3512..76dfdcff802dc6acee5103269a968fda0fd4b3fb 100644 (file)
@@ -31,8 +31,6 @@ linters:
         Enabled: false # TODO
       Layout/LeadingBlankLines:
         Enabled: false # TODO
-      Style/NestedParenthesizedCalls:
-        Enabled: false # TODO
       Rails/LinkToBlank:
         Enabled: false # TODO
       Style/ConditionalAssignment:
index 53279d24eea524f559e1a646dce174c54d07a8d0..2929e610ece6ebbf345b906509f7d7f769f2fc45 100644 (file)
@@ -1,4 +1,4 @@
-<% set_title(t "browse.note.new_note") %>
+<% set_title(t("browse.note.new_note")) %>
 
 <h2>
   <a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
index 8b07adfc2ad0e3ec152b569660e43b3c670b6faa..ea40a00dbcf7ee91189efd95447bf3edbe0b0034 100644 (file)
@@ -1,4 +1,4 @@
-<% set_title(t ".title") %>
+<% set_title(t(".title")) %>
 
 <h2>
   <a class="geolink" href="<%= root_path %>"><span class="icon close"></span></a>
index 6f0626cc23667c7a7dde9c96b678bc19f426493f..fc1cca66e43fe7cea4217437e7c33d66d64c73cb 100644 (file)
@@ -7,7 +7,7 @@
     <h2><%= link_to h(diary_entry.title), diary_entry_path(diary_entry.user, diary_entry) %></h2>
 
     <small class='deemphasize'>
-      <%= raw(t ".posted_by", :link_user => (link_to h(diary_entry.user.display_name), user_path(diary_entry.user)), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to h(diary_entry.language.name), :controller => "diary_entries", :action => "index", :display_name => nil, :language => diary_entry.language_code)) %>
+      <%= raw(t(".posted_by", :link_user => (link_to h(diary_entry.user.display_name), user_path(diary_entry.user)), :created => l(diary_entry.created_at, :format => :blog), :language_link => (link_to h(diary_entry.language.name), :controller => "diary_entries", :action => "index", :display_name => nil, :language => diary_entry.language_code))) %>
     </small>
 
   </div>
index ec349c7bff60419b6789dabebd90a8b8c5973fa1..a44c5564309db4bf9b3b520ef9569814902f2c47 100644 (file)
@@ -3,7 +3,7 @@
     <%= t("site.sidebar.search_results") %>
 </h2>
 <% @sources.each do |source| %>
-  <h4 class="inner12"><%= raw(t ".title.#{source}") %></h4>
+  <h4 class="inner12"><%= raw(t(".title.#{source}")) %></h4>
   <div class="search_results_entry" data-href="<%= url_for @params.merge(:action => "search_#{source}") %>">
     <%= image_tag "searching.gif", :class => "loader" %>
   </div>
index ba4425c80d578973e93652cdd90698c6b580724c..40bb8e8a371ce045153a0d28f3a64772db54bbdc 100644 (file)
@@ -24,5 +24,5 @@
     </tbody>
   </table>
 <% else %>
-  <div><%= raw(t ".no_messages_yet", :people_mapping_nearby_link => link_to(t(".people_mapping_nearby"), user_path(current_user))) %></div>
+  <div><%= raw(t(".no_messages_yet", :people_mapping_nearby_link => link_to(t(".people_mapping_nearby"), user_path(current_user)))) %></div>
 <% end %>
index dedace3d7657956b49802c45599be8c2ef703316..532f3d71ee335558f36dce2004ad04d23193d233 100644 (file)
@@ -1,5 +1,5 @@
 <% content_for :heading do %>
-  <h2><%= raw(t ".send_message_to", :name => link_to(h(@message.recipient.display_name), user_path(@message.recipient))) %></h2>
+  <h2><%= raw(t(".send_message_to", :name => link_to(h(@message.recipient.display_name), user_path(@message.recipient)))) %></h2>
 <% end %>
 
 <%= error_messages_for "message" %>
index f30434a9c0ae1b8ce89f19ad695de8eca104af7a..a06e18838ff797b23aadb83395fe66240e7738aa 100644 (file)
@@ -3,7 +3,7 @@
 <% end %>
 
 <% content_for :heading do %>
-  <h2><%= raw(t ".my_inbox", :inbox_link => link_to(t(".inbox"), inbox_messages_path)) %>/<%= t ".outbox" %></h2>
+  <h2><%= raw(t(".my_inbox", :inbox_link => link_to(t(".inbox"), inbox_messages_path))) %>/<%= t ".outbox" %></h2>
 <% end %>
 
 <h4><%= t ".messages", :count => current_user.sent_messages.size %></h4>
@@ -23,5 +23,5 @@
     </tbody>
   </table>
 <% else %>
-  <div class="messages"><%= raw(t ".no_sent_messages", :people_mapping_nearby_link => link_to(t(".people_mapping_nearby"), user_path(current_user))) %></div>
+  <div class="messages"><%= raw(t(".no_sent_messages", :people_mapping_nearby_link => link_to(t(".people_mapping_nearby"), user_path(current_user)))) %></div>
 <% end %>
index 69b5800a4d774d442935db05ae3a0cc8f7873298..0cb70d2d557977a91dfeeff6b884f1cc4257b678 100644 (file)
@@ -26,7 +26,7 @@
       <%= f.email_field(:email_confirmation, :tabindex => 2) %>
       <%= f.error_message_on(:email_confirmation) %>
     </div>
-    <span class="form-help deemphasize"><%= raw(t ".not displayed publicly") %></span>
+    <span class="form-help deemphasize"><%= raw(t(".not displayed publicly")) %></span>
   </fieldset>
 
   <fieldset>
index 9f967742eacff254ca713a7ea4c6771604e94234..28dc07e0d2f4366bb50a648a173963ea7c8d0254 100644 (file)
   <% if current_user and @user.id == current_user.id %>
     <% if @user.home_lat.nil? or @user.home_lon.nil? %>
       <div id="map" class="content_map">
-        <p id="no_home_location"><%= raw(t ".if set location", :settings_link => (link_to t(".settings_link_text"), :controller => "users", :action => "account", :display_name => current_user.display_name)) %></p>
+        <p id="no_home_location"><%= raw(t(".if set location", :settings_link => (link_to t(".settings_link_text"), :controller => "users", :action => "account", :display_name => current_user.display_name))) %></p>
       </div>
     <% else %>
       <% content_for :head do %>