-
Notifications
You must be signed in to change notification settings - Fork 405
Open
Description
ror_ecommerce/app/views/admin/rma/return_authorizations/_form.html.erb
<% return_item = @return_authorization.return_items.detect {|p| p.order_item_id == item.id } %>
will issue a query to get all return_items of @return_authorization, and then detect them to find the one with specified item.id.
However, use find_by will only issue the query use where condition
@return_authorization.return_items.find_by(order_item_id: item.id)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels