[Ror-es] COMO HACER UN SELECT CON GROUP

JDT jdltorre at viabcp.com
Thu Jun 7 12:36:41 GMT 2007


EN METODO SIGUIENTE ESTA FUNCIOANDO, PERO SI DESEO HACER UNA SUAMTORIA 
DE IMPORTE POR FECHA, USANDO UN GROUP COMO LO HARIA.



  def resumen_por_fecha
    items_por_pagina = 10
    condiciones =  "id_cliente = '20112273922'"
    grupo         =  "fecha"
    @estadisticas_pages, @estadisticas = paginate:estadisticas,
                                                                    
:select => "precio_vta as importe_fecha, fecha",
                                                                    
:conditions => condiciones,
                                                                    
:per_page  => items_por_pagina            
  end
end




GRACIAS




More information about the Ror-es mailing list