Ruby on Rails Friday, April 29, 2011



On Fri, Apr 29, 2011 at 5:05 PM, Mauro <mrsanna1@gmail.com> wrote:
On 29 April 2011 23:52, David Kahn <dk@structuralartistry.com> wrote:
>
>
> On Fri, Apr 29, 2011 at 4:41 PM, Mauro <mrsanna1@gmail.com> wrote:
>>
>> I have a Shop model with some attributes:
>>
>>  role_number   :integer(10)
>>  role_date     :date
>>  name          :string(255)
>>  ssn           :string(255)
>>  nationality   :string(255)
>>  address       :string(255)
>>  number        :string(255)
>>  website       :string(255)
>>  district      :integer(10)
>>  sector        :string(255)
>>  square_meters :integer(131089)
>>  duaap         :integer(10)
>>  description   :string(255)
>>  state         :string(255)
>>  notes         :text
>>
>> I want to create a form for searching on one field or on two fields or
>> on three fields...............or on all fields.
>> There is a gem that facilitate this work?
>> I'm thinking about meta_search, what do you think about?
>
> I just used MetaSearch for the first time last month and love it. I found it
> very easy to work with and quite powerful.

What solution do you adopt?
A form with all fields in it?

If you use MetaSearch, it helps you build your form -- see the readme: https://github.com/ernie/meta_search

Now, the app I was working on was more complicated so I did actually create a class so that I could use form builder on my own, and then wrap metasearch behind that. The form consisted of a number of filters. But even if I went straight to metasearch, yes, I would use a form with the fields I want to search which may or may not map to the actual fields I am searching.
 

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.


--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment