mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-03 06:59:14 +00:00
Update code style for Enterpise.not_ready_for_checkout
This was changed into multiple lines for readability.
This commit is contained in:
@@ -97,7 +97,11 @@ class Enterprise < ActiveRecord::Base
|
||||
# When ready_for_checkout is empty, return all rows when there are no enterprises ready for
|
||||
# checkout.
|
||||
ready_enterprises = Enterprise.ready_for_checkout
|
||||
ready_enterprises.present? ? where("id NOT IN (?)", ready_enterprises) : where("TRUE")
|
||||
if ready_enterprises.present?
|
||||
where("id NOT IN (?)", ready_enterprises)
|
||||
else
|
||||
where("TRUE")
|
||||
end
|
||||
}
|
||||
scope :is_primary_producer, where(:is_primary_producer => true)
|
||||
scope :is_distributor, where('sells != ?', 'none')
|
||||
|
||||
Reference in New Issue
Block a user