erblint: prefer symbolic logical operators over and/or/not
This commit is contained in:
parent
dbbbd62ef1
commit
7cd7354673
7 changed files with 6 additions and 10 deletions
|
@ -1,4 +1,4 @@
|
|||
<tr id="inbox-<%= message_summary.id %>" class="inbox-row<%= "-unread" if not message_summary.message_read? %>">
|
||||
<tr id="inbox-<%= message_summary.id %>" class="inbox-row<%= "-unread" if !message_summary.message_read? %>">
|
||||
<td class="inbox-sender"><%= link_to h(message_summary.sender.display_name), user_path(message_summary.sender) %></td>
|
||||
<td class="inbox-subject"><%= link_to h(message_summary.title), message_path(message_summary) %></td>
|
||||
<td class="inbox-sent"><%= l message_summary.sent_on, :format => :friendly %></td>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<%= javascript_include_tag "edit/potlatch" %>
|
||||
|
||||
<div id="map">
|
||||
<% session[:token] = current_user.tokens.create.token unless session[:token] and UserToken.find_by_token(session[:token]) -%>
|
||||
<% session[:token] = current_user.tokens.create.token unless session[:token] && UserToken.find_by_token(session[:token]) -%>
|
||||
<% data = { :token => session[:token] } -%>
|
||||
<% data[:lat] = @lat if @lat -%>
|
||||
<% data[:lon] = @lon if @lon -%>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<%= javascript_include_tag "edit/potlatch2" %>
|
||||
|
||||
<div id="map">
|
||||
<% session[:token] = current_user.tokens.create.token unless session[:token] and UserToken.find_by_token(session[:token]) -%>
|
||||
<% session[:token] = current_user.tokens.create.token unless session[:token] && UserToken.find_by_token(session[:token]) -%>
|
||||
<% data = { :token => session[:token] } -%>
|
||||
<% data[:lat] = @lat if @lat -%>
|
||||
<% data[:lon] = @lon if @lon -%>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<% end %>
|
||||
|
||||
<% unless @user_blocks.empty? %>
|
||||
<%= render :partial => "blocks", :locals => { :show_revoke_link => (current_user and current_user.moderator?), :show_user_name => true, :show_creator_name => false } %>
|
||||
<%= render :partial => "blocks", :locals => { :show_revoke_link => (current_user && current_user.moderator?), :show_user_name => true, :show_creator_name => false } %>
|
||||
<% else %>
|
||||
<p><%= t ".empty", :name => h(@user.display_name) %></p>
|
||||
<% end %>
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<h1><%= raw(t(".heading", :name => link_to(h(@user.display_name), user_path(@user)))) %></h1>
|
||||
<% end %>
|
||||
<% unless @user_blocks.empty? %>
|
||||
<%= render :partial => "blocks", :locals => { :show_revoke_link => (current_user and current_user.moderator?), :show_user_name => false, :show_creator_name => true } %>
|
||||
<%= render :partial => "blocks", :locals => { :show_revoke_link => (current_user && current_user.moderator?), :show_user_name => false, :show_creator_name => true } %>
|
||||
<% else %>
|
||||
<p><%= t ".empty", :name => h(@user.display_name) %></p>
|
||||
<% end %>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<% end %>
|
||||
|
||||
<% unless @user_blocks.empty? %>
|
||||
<%= render :partial => "blocks", :locals => { :show_revoke_link => (current_user and current_user.moderator?), :show_user_name => true, :show_creator_name => true } %>
|
||||
<%= render :partial => "blocks", :locals => { :show_revoke_link => (current_user && current_user.moderator?), :show_user_name => true, :show_creator_name => true } %>
|
||||
<% else %>
|
||||
<p><%= t ".empty" %></p>
|
||||
<% end %>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue