# Rails Elements for comparison selects

**URL:** <https://www.ruby-forum.com/t/rails-elements-for-comparison-selects/172601>\
**Category:** Rails\
**Created:** [July 23, 2009, 11:02pm UTC](https://www.ruby-forum.com/t/rails-elements-for-comparison-selects/172601 "2009-07-23T23:02:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![elricstorm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/da6949/32.png) [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Post date:** [July 23, 2009, 11:02pm UTC](https://www.ruby-forum.com/t/rails-elements-for-comparison-selects/172601/1 "2009-07-23T23:02:49Z")

</div>

I’m trying to find out what select elements would be best to use for  
comparison statements between two objects. Overall, the objects belong  
to the same table using the same id structure.

A person would have to visibly select one object and then another and  
click a submit button. I’m not sure which would best translate for this  
particular application.

There are a possible 120 objects to select from so dropdowns might  
become cumbersome. The same could be said for checkboxes.

Example Scenario:

120 teams (select # one)  
120 teams (select # two)

Teams can’t be the same so perhaps some ajax functionality to not make  
the second selector enabled or visible until the first is checked.  
Then, remove team from select one out of the select two list.

I could probably use ajax to render a partial for each or start with one  
select visible and render the second partial for the second team select.

Which still brings me to my options? How to select a team. Through  
checkboxes, dropdowns, search boxes, etc.?

What are my choices and what advice do you think I should follow for  
this particular implementation?

Thanks.

---

<div class="post-metadata">

**Author:** ![elricstorm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/da6949/32.png) [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Post date:** [July 24, 2009, 12:13am UTC](https://www.ruby-forum.com/t/rails-elements-for-comparison-selects/172601/2 "2009-07-24T00:13:41Z")

</div>

On Jul 23, 2009, at 2:02 PM, Älphä Blüë wrote:

> Then, remove team from select one out of the select two list.  
> this particular implementation?  
> If the team names are well known, I’d go with an auto-completing text  
> field.

-philip

---

<div class="post-metadata">

**Author:** ![elricstorm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/da6949/32.png) [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Post date:** [July 24, 2009, 12:34am UTC](https://www.ruby-forum.com/t/rails-elements-for-comparison-selects/172601/3 "2009-07-24T00:34:50Z")

</div>

Phillip that’s a really good idea. I was looking previously at dynamic  
ajax observers with select dropdowns but I just don’t like dropdowns.

I hadn’t thought about auto-completion…

Thanks. I’ll post back if I have any questions.

–  
Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![elricstorm](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/da6949/32.png) [@elricstorm](https://www.ruby-forum.com/u/elricstorm)\
**Post date:** [July 24, 2009, 12:35am UTC](https://www.ruby-forum.com/t/rails-elements-for-comparison-selects/172601/4 "2009-07-24T00:35:25Z")

</div>

Philip H. wrote:

> On Jul 23, 2009, at 2:02 PM, ï¿½lphï¿½ Blï¿½ï¿½ wrote:
> 
> > Then, remove team from select one out of the select two list.  
> > this particular implementation?  
> > If the team names are well known, I’d go with an auto-completing text  
> > field.
> 
> -philip

Phillip that’s a really good idea. I was looking previously at dynamic  
ajax observers with select dropdowns but I just don’t like dropdowns.

I hadn’t thought about auto-completion…

Thanks. I’ll post back if I have any questions.

–  
Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
