app/controllers/groups_controller.rb
def load_product_groups
      @available_products = Product.order(:name) - @group.products
      @product_groups = @group.product_groups.includes(:product).order("products.name")
      @product_groups = @product_groups.paginate(:page =>   
            params[:products_page], :per_page => session[:results_per_page])
    end
# Loads all products allocated to the group for the given fiscal year.
Loads all products allocated to the group for the given fiscal year.
Loads all products allocated to the group for the given fiscal year .
def load_product_groups
      @available_products = Product.order(:name) - @group.products
      @product_groups = @group.product_groups.includes(:product).order("products.name")
      @product_groups = @product_groups.paginate(:page =>   
            params[:products_page], :per_page => session[:results_per_page])
    end
def load_product_groups @available_products = Product . order ( :name ) - @group . products @product_groups = @group . product_groups . includes ( :product ) . order ( "products.name" ) @product_groups = @product_groups . paginate ( :page => params [ :products_page ] , :per_page => session [ :results_per_page ] ) end
Loads all products allocated to the group for the given fiscal year.
Loads all products allocated to the group for the given fiscal year .