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:
@@ -3,5 +3,5 @@
|
||||
<% @ancestors.map do |ancestor| %>
|
||||
<%= turbo_stream.replace ancestor %>
|
||||
<% end %>
|
||||
<%= @before.nil? ? turbo_stream.append(:quantities, @quantity) :
|
||||
turbo_stream.before(@before, @quantity) %>
|
||||
<%= @before ? turbo_stream.before(@before, @quantity) :
|
||||
turbo_stream.append(:quantities, @quantity) %>
|
||||
|
||||
Reference in New Issue
Block a user