forked from fixin.me/fixin.me
Simplify object and association checks
* check for <object> instead of <object>.nil? * check for <association>_id? instead of <association>.nil? (avoids record loading)
This commit is contained in:
@@ -5,5 +5,5 @@
|
||||
<%= turbo_stream.replace ancestor %>
|
||||
<% end %>
|
||||
<% @self_and_progenies.each do |q| %>
|
||||
<%= @before.nil? ? turbo_stream.append(:quantities, q) : turbo_stream.before(@before, q) %>
|
||||
<%= @before ? turbo_stream.before(@before, q) : turbo_stream.append(:quantities, q) %>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user