mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-25 01:23:23 +00:00
Use auto correct to fix rubocop issues
This commit is contained in:
@@ -5,13 +5,13 @@ module Api
|
||||
skip_authorization_check only: [:index, :show, :jstree]
|
||||
|
||||
def index
|
||||
if taxonomy
|
||||
@taxons = taxonomy.root.children
|
||||
elsif params[:ids]
|
||||
@taxons = Spree::Taxon.where(id: params[:ids].split(","))
|
||||
else
|
||||
@taxons = Spree::Taxon.ransack(params[:q]).result
|
||||
end
|
||||
@taxons = if taxonomy
|
||||
taxonomy.root.children
|
||||
elsif params[:ids]
|
||||
Spree::Taxon.where(id: params[:ids].split(","))
|
||||
else
|
||||
Spree::Taxon.ransack(params[:q]).result
|
||||
end
|
||||
render json: @taxons, each_serializer: Api::TaxonSerializer
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user