same problem here, but doesn't work:
config.search.columns = [:id]
PGError: ERROR: no existe la función lower(integer)
LINE 1: ...arios_guias".id = "guias".destinatario_id WHERE ((LOWER
(guia...
^
HINT: Ninguna función coincide en el nombre y tipos de argumentos.
Puede desear agregar conversión explícita de tipos.
: SELECT count(DISTINCT "guias".id) AS count_all FROM "guias" LEFT
OUTER JOIN "buzones" ON "buzones".id = "guias".buzon_id LEFT OUTER
JOIN "buzones" destinatarios_guias ON "destinatarios_guias".id =
"guias".destinatario_id WHERE ((LOWER(guias."id") LIKE E'%86%'))
Looking deeper, i found that
ActiveScaffold::Finder::create_conditions_for_columns treats all
columns as string behavior. Anyone have seen this?
On Jan 15, 9:56 am, "G. Sobrinho" <[email protected]> wrote:
> It's solve... Thank for support
>
> 2009/1/14 Mike Gaffney <[email protected]>
>
>
>
> > did you try config.search.columns?
>
> > G. Sobrinho wrote:
> > > Hi all,
>
> > > I need a small feature into AS: search by id (into search field).
> > > I search for 40 and #40 but this doesnt work... See:
>
> > > /SELECT * FROM "atendimentos" WHERE ((LOWER(atendimentos."acidentes")
> > > LIKE '%#40%' OR LOWER(atendimentos."alergia_descricao") LIKE '%#40%'
> > > OR LOWER(atendimentos."alteracao_audicao_descricao") LIKE '%#40%' OR
> > > LOWER(atendimentos."alteracao_visao_descricao") LIKE '%#40%' OR
> > > LOWER(atendimentos."antecedentes_familiares") LIKE '%#40%' OR
> > > LOWER(atendimentos."aparelho_circulatorio") LIKE '%#40%' OR
> > > LOWER(atendimentos."aparelho_digestivo") LIKE '%#40%' OR
> > > LOWER(atendimentos."aparelho_respiratorio") LIKE '%#40%' OR
> > > LOWER(atendimentos."atividade_fisica_descricao") LIKE '%#40%' OR
> > > LOWER(atendimentos."avaliacao_funcionario") LIKE '%#40%' OR
> > > LOWER(atendimentos."cansaco_fisico_descricao") LIKE '%#40%' OR
> > > LOWER(atendimentos."cirurgia_anterior_descricao") LIKE '%#40%' OR
> > > LOWER(atendimentos."cirurgia_prevista_descricao") LIKE '%#40%' OR
> > > LOWER(atendimentos."descricao_atestado") LIKE '%#40%' OR
> > > LOWER(atendimentos."doenca_cardiologica_descricao") LIKE '%#40%' OR
> > > LOWER(atendimentos."doenca_endocrino_metabolica_descricao") LIKE
> > > '%#40%' OR LOWER(atendimentos."doenca_gastro_intestinal_descricao")
> > > LIKE '%#40%' OR LOWER(atendimentos."doenca_neurologica_descricao")
> > > LIKE '%#40%' OR LOWER(atendimentos."doenca_osteo_muscular_descricao")
> > > LIKE '%#40%' OR LOWER(atendimentos."doenca_pele_descricao") LIKE
> > > '%#40%' OR LOWER(atendimentos."doenca_renal_descricao") LIKE '%#40%'
> > > OR LOWER(atendimentos."doenca_respiratoria_descricao") LIKE '%#40%' OR
> > > LOWER(atendimentos."etilismo_descricao") LIKE '%#40%' OR
> > > LOWER(atendimentos."ex_fumante_descricao") LIKE '%#40%' OR
> > > LOWER(atendimentos."exame_medico") LIKE '%#40%' OR
> > > LOWER(atendimentos."fumante_descricao") LIKE '%#40%' OR
> > > LOWER(atendimentos."funcoes_anteriores") LIKE '%#40%' OR
> > > LOWER(atendimentos."hernia_descricao") LIKE '%#40%' OR
> > > LOWER(atendimentos."internacao_previa_descricao") LIKE '%#40%' OR
> > > LOWER(atendimentos."medicacao_descricao") LIKE '%#40%' OR
> > > LOWER(atendimentos."queixas") LIKE '%#40%' OR
> > > LOWER(atendimentos."recomendacao") LIKE '%#40%' OR
> > > LOWER(atendimentos."sistema_nervoso_psiquico") LIKE '%#40%' OR
> > > LOWER(atendimentos."sistema_osteo_muscular") LIKE '%#40%' OR
> > > LOWER(atendimentos."tratamento_descricao") LIKE '%#40%' OR
> > > LOWER(atendimentos."varize_descricao") LIKE '%#40%') AND status
> > > IN(0,1)) ORDER BY atendimentos."id" ASC LIMIT 15 OFFSET 0
>
> > > /
> > > I need to get records by id into search field... It's possible?
>
> > > Tks in advance
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---