El Friday 30 January 2009 02:02:08 Eraticus escribió: > I was surprised that the conditions set in the controller method > "conditions_for_collection" where not also applied to the search > criteria. > > What I was hoping to do was to create a couple of different admin > pages for the same table, but only showing rows with a specific value > in a discriminant field, such as type, or parent_id, etc. > > The conditions_for_collection works beautifully for filtering the > returned collection. However, when the user then does a search on the > form, he will receive all rows that match the search criteria. It the > conditions_for_collection filter could be added to the search > criteria,that would be ideal. > > Is there a way to either add "conditions_for_collection" to the search > criteria, or is there a separate method that will function similarly > for the searching?
conditions_for_collection should be used for search too. I have tried with rails 2.2.2 and AS rails-2.2 branch and it's working for me. What version are you using? Can you post your controller? > > -- 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 -~----------~----~----~----~------~----~------~--~---
