Module: Api::TaxonomyScope

Instance Method Summary collapse

Instance Method Details

#set_taxonomy_scopeObject


9
10
11
12
# File 'app/controllers/concerns/api/taxonomy_scope.rb', line 9

def set_taxonomy_scope
  Location.current ||= @location = Location.find_by_id(params[:location_id]) if SETTINGS[:locations_enabled]
  Organization.current ||= @organization = Organization.find_by_id(params[:organization_id]) if SETTINGS[:organizations_enabled]
end