app/controllers/products_controller.rb
# Loads all employees, groups, and services belonging to the product
Loads all employees, groups, and services belonging to the product
Loads all employees groups and services belonging to the product
def load_associations
      @dependencies = @product.dependencies.order(:name)
      @dependents = @product.dependents.order(:name)
      @portfolios = @product.portfolios.order(:name).uniq
      @product_groups = @product.product_groups.includes(:group).order("groups.name")
      @product_services = @product.product_services.includes(:service).order("services.name")
      @employee_products = @product.employee_products.joins(:employee).where(
          :fiscal_year_id => @year.id).includes(:employee).order(:last_name, :first_name)
    end
def load_associations @dependencies = @product . dependencies . order ( :name ) @dependents = @product . dependents . order ( :name ) @portfolios = @product . portfolios . order ( :name ) . uniq @product_groups = @product . product_groups . includes ( :group ) . order ( "groups.name" ) @product_services = @product . product_services . includes ( :service ) . order ( "services.name" ) @employee_products = @product . employee_products . joins ( :employee ) . where ( :fiscal_year_id => @year . id ) . includes ( :employee ) . order ( :last_name , :first_name ) end
Loads all employees, groups, and services belonging to the product
Loads all employees groups and services belonging to the product