Well, I'm wasn't able to do the override. Followed the "instructions" on the site and they were simply ignored by the application. Detected another problem though.
One of the fields I'm searching in, is obviously, a timestamp field. when I do something like "config.search.columns = [:first_name,:last_name,created_at]" and submit a search, it simply brakes down because its going to compare text input with dates (I guess). Any clue how to set scaffold to do the search on date fields? Or how do I turn the timestamp field from the DB in text before comparing it with the user input?(I don't believe this to be possible, but doesn't hurt to ask) One other thing. When I submit, all the form fields I've created are being sent on POST. How do I make the scaffold use them? I though on redefine the "update_table" method on the controller, but I soon realized that it was going to be an headache doing so without missing anything. Since I don't even know what to render or where the original code is so I could "clone" it on that particular spot. The form behavior to select the dates and the comparison method between them its done, but now, under the hood, I not been able to use the several inputs, either for validation or whatever. And it brakes even if I only try to include the date field on the searching fields list. Any help on this I would appreciate it. On Sep 30, 4:59 pm, "Sergio Cambra .:: entreCables S.L. ::." <[email protected]> wrote: > On Miércoles, 30 de Septiembre de 2009 16:18:45 Esfera escribió: > > > I changed the usual search form from active scaffold to add it a > > select box, where I choose the kind of date comparison as " < > <= => > > = != between" and two calendardateselecter. > > All the elements have different id's. > > Have you tried field_search? It has that feature, if I understand you right. > > > > > Now comes the big question. > > > How do you do something like sql...yadayada where SOMECOLUMN between > > X and Y in active scaffold? > > > I've been reading about the search_ui, the search_sql and didn't found > > a solution or the code for a working example so I could see how. > > > Anyone has an idea on how to do this? > > You can add a method to controller to set the conditions for a column, but > it's used only with field_search. It's explained in Search > Overrides:http://wiki.github.com/activescaffold/active_scaffold/search-overrides > > -- > 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 -~----------~----~----~----~------~----~------~--~---
