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 online Mo3 

  • Awesomeness on Rails
  • Group: Moderators
  • Posts: 1957
  • Joined: 21-July 10
  • LocationBavaria
  • 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.
Ruby on Rails | Python | PHP
What is necessary to change a person is to change his awareness of himself.
0


User is offline TheEmpty 

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

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

Mo3, 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 online Mo3 

  • Awesomeness on Rails
  • Group: Moderators
  • Posts: 1957
  • Joined: 21-July 10
  • LocationBavaria
  • 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.
Ruby on Rails | Python | PHP
What is necessary to change a person is to change his awareness of himself.
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