Hi,

I have looked into
https://github.com/activescaffold/active_scaffold/wiki/Search-on-second-order-association.
But still not sure how to do what I need.

Company has_many employees. A search on company needs to search fields in
company and also employees'. We are particularly interested in field
first_name, last_name, office_phone and cell_phone in table employees. Would
something like the following work?

class CompaniesController < ApplicationController

  config.search.columns << :employee
config.columns[:employee].search_sql = "employees.first_name" ### how to put
last_name and other field?
 config.columns[:employee].search_ui = :string # optional
 config.columns[:employee].options[:string_comparators] = true # optional

end


Any suggestion?

Thanks,
Richard

-- 
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