app/controllers/groups_controller.rb
def services
    @selected_service = params[:selected_service]
    if params[:group][:id] == "0"
      @services = Service.joins(:employees).uniq.order(:name)
    else 
      @group = Group.find(params[:group][:id])
      @services = @group.services(@year)
    end
    render :layout => false
  end
# Populates the service dropdown list on the "pages/home" page based on the group selected
Populates the service dropdown list on the "pages/home" page based on the group selected
Populates the service dropdown list on the " pages / home " page based on the group selected
def services
    @selected_service = params[:selected_service]
    if params[:group][:id] == "0"
      @services = Service.joins(:employees).uniq.order(:name)
    else 
      @group = Group.find(params[:group][:id])
      @services = @group.services(@year)
    end
    render :layout => false
  end
def services @selected_service = params [ :selected_service ] if params [ :group ] [ :id ] == "0" @services = Service . joins ( :employees ) . uniq . order ( :name ) else @group = Group . find ( params [ :group ] [ :id ] ) @services = @group . services ( @year ) end render :layout => false end
Populates the service dropdown list on the "pages/home" page based on the group selected
Populates the service dropdown list on the " pages / home " page based on the group selected