webdevRefinery Forum: What the hell? - webdevRefinery Forum

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

User is offline Mo3 

  • Brogrammer
  • Group: Moderators
  • Posts: 1950
  • Joined: 21-July 10
  • LocationStuttgart, Germany
  • Expertise:PHP,Java,Javascript,Python,Ruby on Rails,Node.js

Posted 09 October 2011 - 01:03 PM (#1)

What the hell?


<%= f.label :suitabilities, :class => 'block'  %>
<%= collection_select(:package, :suitability_ids, Suitability.all, :id, :suitable_for,{},
   {:multiple => true, :class => 'block'}) %>


This is my code. It's supposed to create a select box for suitabilities, but it appears to be bugged:

Posted Image

HTML output:

<label class="block" for="package_suitabilities">Suitabilities</label>
<select class="block" id="package_suitability_ids" multiple="multiple" name="package[suitability_ids][]" size="5"><option value="1">Everyone</option>
<option value="2" selected="selected">Kids</option>
<option value="3">Men</option></select>


As you can see, there's a second select box under the actual select box ಠ_ಠ What the hell? This happens on all browsers.

Quote

A person who thinks all the time has nothing to think about except thoughts. So he loses touch with reality, and lives in a world of illusion called the past. Things are not explained by the past, they are explained by what happens right now. That creates the past, and it begins here. That's the birth of responsibility.
0


User is offline TheEmpty 

  • I say words in sequences.
  • Group: Members
  • Posts: 5154
  • Joined: 02-October 10
  • Expertise:HTML,CSS,PHP,Java,Javascript,Python,Ruby on Rails,SQL

Posted 09 October 2011 - 01:33 PM (#2)

View PostMo3, on 09 October 2011 - 01:03 PM, said:

As you can see, there's a second select box under the actual select box ಠ_ಠ What the hell? This happens on all browsers.

This is common when you forget to delete the lines around it that did the same purpose until you replaced it ;)

If not, then I can be of no help. You're not running on edge are you?
Reserved.
0


User is offline Mo3 

  • Brogrammer
  • Group: Moderators
  • Posts: 1950
  • Joined: 21-July 10
  • LocationStuttgart, Germany
  • Expertise:PHP,Java,Javascript,Python,Ruby on Rails,Node.js

Posted 09 October 2011 - 01:42 PM (#3)

Nope, I'm not.

I have another form that has the same code in it, but instead of the :package model it refers to another model. That form isn't bugged and works fine. I'm confused.

Quote

A person who thinks all the time has nothing to think about except thoughts. So he loses touch with reality, and lives in a world of illusion called the past. Things are not explained by the past, they are explained by what happens right now. That creates the past, and it begins here. That's the birth of responsibility.
0


Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Enter your sign in name and password


Sign in options
  Or sign in with these services