El Thursday 23 April 2009 20:02:34 Wes Gamble escribió:
> All,
>
> Rails 2.1
> AS 2.1
>
> I have an AS model (MedicalFacility) that HABTM another AS model
> (MedicalFacilityCategory).
>
> If I put the following into my medical_facilities_controller:
>
>     config.columns[:medical_facility_categories].search_sql =
> "medical_facility_categories.category"
>     config.search.columns << :medical_facility_categories
>
> does this just enhance the search field to also search the "text" of
> medical_facility_categories.category?
>
> If I want to basically provide a dropdown of categories and then do a
> textual search on medical facilities within the context of a given
> category, will I need to customize both the search partial, and the SQL
> that gets executed on the server in?
>
> Restated, I want a search where I type in something in the search box
> and separately, I choose a category from a dropdown and then my search
> is executed only against that particular category.  Is that kind of
> searching supported by AS out of the box or do I need to customize it in?

You can use field_search, but if you want a text field to search in some 
fields and a dropdown select field to search in category it's better override 
_search partial

-- 
Sergio Cambra .:: entreCables S.L. ::.
Nicolás Guillén 6, locales 2 y 3. 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to