On Miércoles, 5 de Mayo de 2010 18:53:43 Iñaki Baz Castillo escribió:
> Hi, two questions about field_search. I set:
>
> config.field_search.columns = [:username, :clis]
>
> :clis is a "has_many" association as usual.
>
> When I press "Search" I see two select boxes (in Spanish language):
>
> - Username: [ Termina con ] [ ]
> - Clis : [ 999888777 ]
>
>
> 1) "Termina con" means "Ends with". Is it possible to use "Contiene"
> ("includes") by default? IMHO it makes sense.
Fixed.
>
>
> 2) The select box for "Clis" allows me to select any of the existing
> cli's in the "clis" table. Is not possible to write some text and do a
> search as in the first "username" field?
Yes, you will have to set search_sql in clis column, and set :string
search_ui:
config.columns[:clis].search_sql = 'clis.name'
config.columns[:clis].search_ui = :string
--
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [email protected]
--
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.