class Project has_many :events, :class_name => "EventLog" end
class EventLog #attributes: event_type, event_date end I want to setup a field search column for Project that gives me a select list for Event Type as well as the normal date search fields. I'd like to be able to use #active_scaffold_search_date_bridge to setup the date search form parts, and #condition_for_date_bridge_type (both in lib/active_scaffold/bridges/shared/date_bridge.rb) so I don't have to recreate them. But I need to be able to add an event_type select that allows the user to choose the type of event to search for. The tricky parts (as I see them) are 1. ensuring that the search form state is saved and the existing selected values can be used to populate the search form again. 2. ensuring that I don't repeat the code for setting up the form element or the conditions output. 3. Doing it in a helper instead of editing the active_scaffold code directly. I accept this is prolly not a safe way to do things, but I'm willing to accept some brittleness in order to get it working. even a pointer to a code sample for a similar problem would be welcome. Thanks. -- You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" group. To view this discussion on the web visit https://groups.google.com/d/msg/activescaffold/-/cyrpM2vZfscJ. 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.
