# 12\_hour\_time\_select plugin help

**URL:** <https://www.ruby-forum.com/t/12-hour-time-select-plugin-help/111285>\
**Category:** Rails\
**Created:** [August 5, 2007, 12:35am UTC](https://www.ruby-forum.com/t/12-hour-time-select-plugin-help/111285 "2007-08-05T00:35:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sp00nyg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/edb3f5/32.png) [@sp00nyg](https://www.ruby-forum.com/u/sp00nyg)\
**Post date:** [August 5, 2007, 12:35am UTC](https://www.ruby-forum.com/t/12-hour-time-select-plugin-help/111285/1 "2007-08-05T00:35:07Z")

</div>

After creating a directory called 12\_hour\_time\_select in my plugins  
folder, I added this statement to my view:

\<%= select\_time(Time.now, :twelve\_hour =\> true) %\>

recycled the server. Now when I display the view I get the following  
error:

ArgumentError in Vigils#new

Showing app/views/vigils/\_form.rhtml where line #13 raised:

wrong number of arguments (6 for 3)

Extracted source (around line #13):

10: \<%= text\_field ‘vigil’, ‘location’ %\>

  
11:  
12: 

Start date  
  
13: \<%= select\_time(Time.now, :twelve\_hour =\> true) %\>

Has anyone run into this?

Thanks!  
Dave

---

<div class="post-metadata">

**Author:** ![sp00nyg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/edb3f5/32.png) [@sp00nyg](https://www.ruby-forum.com/u/sp00nyg)\
**Post date:** [September 8, 2007, 9:07am UTC](https://www.ruby-forum.com/t/12-hour-time-select-plugin-help/111285/2 "2007-09-08T09:07:31Z")

</div>

Hi Dave,

What version of rails are you using? For rails 1.2.3, select\_html  
has been changed to 3 parameters instead of 6 in 1.1.2. In  
12\_hour\_time\_select plugin, 12\_hour\_time\_select.rb is using  
select\_html. You may change

```
select_html(options[:field_name] || 'hour', hour_options,

```

options[:prefix], options[:include\_blank], options[:discard\_type],  
options[:disabled])

to

```
select_html(options[:field_name] || 'hour', hour_options,

```

{options[:prefix], options[:include\_blank], options[:discard\_type],  
options[:disabled]})

Arnold.
