Module: Api::TaxonomyScope
- Extended by:
- ActiveSupport::Concern
- Included in:
- V2::ComputeResourcesController, V2::ConfigTemplatesController, V2::DomainsController, V2::EnvironmentsController, V2::HostClassesController, V2::HostgroupClassesController, V2::HostgroupsController, V2::MediaController, V2::ParametersController, V2::PuppetclassesController, V2::SmartProxiesController, V2::SubnetsController, V2::UsersController
- Defined in:
- app/controllers/concerns/api/taxonomy_scope.rb
Instance Method Summary collapse
Instance Method Details
#set_taxonomy_scope ⇒ Object
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 |