i am using active scaffold and have a question on the search. I changed the default full text search to a field search successfully with this in my controller: config.actions.exclude :search config.actions << :field_search my problem is this defaults to all feilds in the search screen, I only want to allow user to search on 3 or 4, does anyone know how to configure for this? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, I use ActiveScaffold a lot but haven''t needed to modify the search conditions (so I haven''t tried this myself). A quick look at this page... http://activescaffold.com/docs/api-search ...seems to indicate that you can modify the search columns like this: config.search.columns << :roles Even more cool is that it says that you can search across the associations as well. Good luck! Chris On Feb 8, 7:17 am, agilehack <jason.rabo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> i am using active scaffold and have a question on the search. I > changed the default full text search to a field search successfully > with this in my controller: > > config.actions.exclude :search > config.actions << :field_search > > my problem is this defaults to all feilds in the search screen, I only > want to allow user to search on 3 or 4, does anyone know how to > configure for this?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
does anyone else have any input on this? I think he is onto something but no matter what I do in the model or controller - no luck. my search is still defaulting to all the columns in the table whereas I would like to just choose about 4. HELP On Feb 8, 2:59 am, "chris.mccauley" <ch...-8Wqby1sJ1UZCBu1DeFptCw@public.gmane.org> wrote:> Hi, > > I use ActiveScaffold a lot but haven''t needed to modify the search > conditions (so I haven''t tried this myself). A quick look at this > page... > > http://activescaffold.com/docs/api-search > > ...seems to indicate that you can modify the search columns like this: > > config.search.columns << :roles > > Even more cool is that it says that you can search across the > associations as well. > > Good luck! > > Chris > > On Feb 8, 7:17 am, agilehack <jason.rabo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > i am using active scaffold and have a question on the search. I > > changed the default full text search to a field search successfully > > with this in my controller: > > > config.actions.exclude :search > > config.actions << :field_search > > > my problem is this defaults to all feilds in the search screen, I only > > want to allow user to search on 3 or 4, does anyone know how to > > configure for this?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
config.actions << :field_search config.field_search.columns = [ :foo, :bar ] like that? On Feb 11, 10:10 pm, agilehack <jason.rabo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> does anyone else have any input on this? I think he is onto something > but no matter what I do in the model or controller - no luck. my > search is still defaulting to all the columns in the table whereas I > would like to just choose about 4. HELP > > On Feb 8, 2:59 am, "chris.mccauley" <ch...-8Wqby1sJ1UZCBu1DeFptCw@public.gmane.org> wrote: > > > Hi, > > > I use ActiveScaffold a lot but haven''t needed to modify the search > > conditions (so I haven''t tried this myself). A quick look at this > > page... > > > http://activescaffold.com/docs/api-search > > > ...seems to indicate that you can modify the search columns like this: > > > config.search.columns << :roles > > > Even more cool is that it says that you can search across the > > associations as well. > > > Good luck! > > > Chris > > > On Feb 8, 7:17 am, agilehack <jason.rabo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > i am using active scaffold and have a question on the search. I > > > changed the default full text search to a field search successfully > > > with this in my controller: > > > > config.actions.exclude :search > > > config.actions << :field_search > > > > my problem is this defaults to all feilds in the search screen, I only > > > want to allow user to search on 3 or 4, does anyone know how to > > > configure for this?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
that worked man!! thanks a ton. thanks to all of you. On Feb 26, 5:19 pm, ChrisWSU <cnl...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> config.actions << :field_search > config.field_search.columns = [ :foo, :bar ] > > like that? > > On Feb 11, 10:10 pm, agilehack <jason.rabo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > does anyone else have any input on this? I think he is onto something > > but no matter what I do in the model or controller - no luck. my > > search is still defaulting to all the columns in the table whereas I > > would like to just choose about 4. HELP > > > On Feb 8, 2:59 am, "chris.mccauley" <ch...-8Wqby1sJ1UZCBu1DeFptCw@public.gmane.org> wrote: > > > > Hi, > > > > I use ActiveScaffold a lot but haven''t needed to modify the search > > > conditions (so I haven''t tried this myself). A quick look at this > > > page... > > > > http://activescaffold.com/docs/api-search > > > > ...seems to indicate that you can modify the search columns like this: > > > > config.search.columns << :roles > > > > Even more cool is that it says that you can search across the > > > associations as well. > > > > Good luck! > > > > Chris > > > > On Feb 8, 7:17 am, agilehack <jason.rabo...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > i am using active scaffold and have a question on the search. I > > > > changed the default full text search to a field search successfully > > > > with this in my controller: > > > > > config.actions.exclude :search > > > > config.actions << :field_search > > > > > my problem is this defaults to all feilds in the search screen, I only > > > > want to allow user to search on 3 or 4, does anyone know how to > > > > configure for this?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---